(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