(0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.2ms) begin transaction  (0.6ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.4ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (2.9ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.1ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (9.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:06:51: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:06:51: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:06:51: LOCAL_SENT\n"], ["msg_id", "test_array_id_36239588"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:06:51: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["log", "2014-02-07 13:06:51: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["log", "2014-02-07 13:06:51: LOCAL_TEST\n2014-02-07 13:06:51: TEST_2\n"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["log", "2014-02-07 13:06:51: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["log", "2014-02-07 13:06:51: ORIGINAL_STATUS\n2014-02-07 13:06:51: DELIVERED\n"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.1ms) Completed 200 OK in 11ms (Views: 1.6ms | ActiveRecord: 1.5ms) ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["log", "2014-02-07 13:06:51: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["log", "2014-02-07 13:06:51: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["log", "2014-02-07 13:06:51: ORIGINAL_STATUS\n2014-02-07 13:06:51: DELIVERED\n"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["log", "2014-02-07 13:06:51: ORIGINAL_STATUS\n2014-02-07 13:06:51: DELIVERED\n"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 15ms (Views: 0.7ms | ActiveRecord: 2.5ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.5ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["msg_id", "idtest_1"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["msg_id", "idtest_0"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.3ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:06:51.416571' AND '2014-02-07 10:56:51.417035')  (0.3ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:06:51.416571' AND '2014-02-07 10:56:51.417035') GROUP BY gateway  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:06:51.416571' AND '2014-02-07 10:56:51.417035')  (0.2ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:06:51.416571' AND '2014-02-07 10:56:51.417035') GROUP BY status  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:06:51.416571' AND '2014-02-07 10:56:51.417035')  (0.2ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:06:51.416571' AND '2014-02-07 10:56:51.417035') GROUP BY sms_type Completed 200 OK in 36ms (Views: 33.5ms | ActiveRecord: 1.5ms)  (0.3ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["msg_id", "idtest_8"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.3ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:06:51.460980' AND '2014-02-07 10:56:51.461298')  (0.3ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:06:51.460980' AND '2014-02-07 10:56:51.461298') GROUP BY gateway  (0.3ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:06:51.460980' AND '2014-02-07 10:56:51.461298')  (0.3ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:06:51.460980' AND '2014-02-07 10:56:51.461298') GROUP BY status  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:06:51.460980' AND '2014-02-07 10:56:51.461298')  (0.2ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:06:51.460980' AND '2014-02-07 10:56:51.461298') GROUP BY sms_type Completed 200 OK in 23ms (Views: 20.9ms | ActiveRecord: 1.6ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.5ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(params) --------------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-02-07 13:06:51: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["to", "555123555"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-02-07 13:06:51: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["to", "123555123"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-02-07 13:06:51: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["to", "555123555"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-02-07 13:06:51: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["to", "123555123"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-02-07 13:06:51: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["to", "4915112341234"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-02-07 13:06:51: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["to", "4917812341234"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:06:51: LOCAL_SENT\n"], ["msg_id", "test_array_id_51181082"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["to", "555123555"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:06:51: LOCAL_SENT\n"], ["msg_id", "test_array_id_48684926"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00], ["to", "123555123"], ["updated_at", Fri, 07 Feb 2014 11:06:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-02-07 13:06:51 +0200 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.2ms) begin transaction  (0.6ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.4ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (2.7ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.1ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (9.7ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:11:47: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:11:47: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:11:47: LOCAL_SENT\n"], ["msg_id", "test_array_id_91654949"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.3ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:11:47: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["log", "2014-02-07 13:11:47: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["log", "2014-02-07 13:11:47: LOCAL_TEST\n2014-02-07 13:11:47: TEST_2\n"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["log", "2014-02-07 13:11:47: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["log", "2014-02-07 13:11:47: ORIGINAL_STATUS\n2014-02-07 13:11:47: DELIVERED\n"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.1ms) Completed 200 OK in 10ms (Views: 1.4ms | ActiveRecord: 1.2ms) ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["log", "2014-02-07 13:11:47: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["log", "2014-02-07 13:11:47: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["log", "2014-02-07 13:11:47: ORIGINAL_STATUS\n2014-02-07 13:11:47: DELIVERED\n"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["log", "2014-02-07 13:11:47: ORIGINAL_STATUS\n2014-02-07 13:11:47: DELIVERED\n"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 14ms (Views: 0.7ms | ActiveRecord: 2.3ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["msg_id", "idtest_8"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.3ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:47.540195' AND '2014-02-07 11:01:47.540563')  (0.3ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:47.540195' AND '2014-02-07 11:01:47.540563') GROUP BY gateway  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:47.540195' AND '2014-02-07 11:01:47.540563')  (0.2ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:47.540195' AND '2014-02-07 11:01:47.540563') GROUP BY status  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:47.540195' AND '2014-02-07 11:01:47.540563')  (0.2ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:47.540195' AND '2014-02-07 11:01:47.540563') GROUP BY sms_type Completed 200 OK in 33ms (Views: 31.3ms | ActiveRecord: 1.5ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.3ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:47.582644' AND '2014-02-07 11:01:47.582927')  (0.2ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:47.582644' AND '2014-02-07 11:01:47.582927') GROUP BY gateway  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:47.582644' AND '2014-02-07 11:01:47.582927')  (0.2ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:47.582644' AND '2014-02-07 11:01:47.582927') GROUP BY status  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:47.582644' AND '2014-02-07 11:01:47.582927')  (0.3ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:47.582644' AND '2014-02-07 11:01:47.582927') GROUP BY sms_type Completed 200 OK in 22ms (Views: 19.9ms | ActiveRecord: 1.4ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["msg_id", "idtest_1"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 12ms (Views: 10.6ms | ActiveRecord: 0.5ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(params) --------------------------------------------------------------------  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-02-07 13:11:47: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["to", "555123555"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-02-07 13:11:47: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["to", "123555123"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-02-07 13:11:47: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["to", "555123555"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-02-07 13:11:47: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["to", "123555123"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-02-07 13:11:47: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["to", "4915112341234"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-02-07 13:11:47: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["to", "4917812341234"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:11:47: LOCAL_SENT\n"], ["msg_id", "test_array_id_57916909"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["to", "555123555"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:11:47: LOCAL_SENT\n"], ["msg_id", "test_array_id_74468864"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00], ["to", "123555123"], ["updated_at", Fri, 07 Feb 2014 11:11:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-02-07 13:11:47 +0200 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.2ms) begin transaction  (0.6ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.4ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (3.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.1ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.1ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.3ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.3ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (10.7ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:11:59: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:11:59: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:11:59: LOCAL_SENT\n"], ["msg_id", "test_array_id_21274018"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:11:59: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["log", "2014-02-07 13:11:59: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["log", "2014-02-07 13:11:59: LOCAL_TEST\n2014-02-07 13:11:59: TEST_2\n"], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["log", "2014-02-07 13:11:59: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["log", "2014-02-07 13:11:59: ORIGINAL_STATUS\n2014-02-07 13:11:59: DELIVERED\n"], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.1ms) Completed 200 OK in 10ms (Views: 1.4ms | ActiveRecord: 1.2ms) ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["log", "2014-02-07 13:11:59: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["log", "2014-02-07 13:11:59: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.6ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["log", "2014-02-07 13:11:59: ORIGINAL_STATUS\n2014-02-07 13:11:59: DELIVERED\n"], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["log", "2014-02-07 13:11:59: ORIGINAL_STATUS\n2014-02-07 13:11:59: DELIVERED\n"], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 15ms (Views: 0.8ms | ActiveRecord: 2.6ms) ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 4ms (Views: 1.0ms | ActiveRecord: 0.4ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["msg_id", "idtest_0"], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Fri, 07 Feb 2014 11:11:59 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.5ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:59.983469' AND '2014-02-07 11:01:59.983886')  (0.5ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:59.983469' AND '2014-02-07 11:01:59.983886') GROUP BY gateway  (0.3ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:59.983469' AND '2014-02-07 11:01:59.983886')  (0.4ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:59.983469' AND '2014-02-07 11:01:59.983886') GROUP BY status  (0.3ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:59.983469' AND '2014-02-07 11:01:59.983886')  (0.4ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:11:59.983469' AND '2014-02-07 11:01:59.983886') GROUP BY sms_type Completed 200 OK in 51ms (Views: 47.4ms | ActiveRecord: 2.4ms)  (0.3ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.5ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:00.048211' AND '2014-02-07 11:02:00.048693')  (0.4ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:00.048211' AND '2014-02-07 11:02:00.048693') GROUP BY gateway  (0.3ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:00.048211' AND '2014-02-07 11:02:00.048693')  (0.4ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:00.048211' AND '2014-02-07 11:02:00.048693') GROUP BY status  (0.3ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:00.048211' AND '2014-02-07 11:02:00.048693')  (0.3ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:00.048211' AND '2014-02-07 11:02:00.048693') GROUP BY sms_type Completed 200 OK in 34ms (Views: 31.5ms | ActiveRecord: 2.2ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 2ms (Views: 0.8ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["msg_id", "idtest_1"], ["updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 12ms (Views: 10.7ms | ActiveRecord: 0.5ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(params) --------------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-02-07 13:12:00: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["to", "555123555"], ["updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-02-07 13:12:00: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["to", "123555123"], ["updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.3ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-02-07 13:12:00: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["to", "555123555"], ["updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-02-07 13:12:00: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["to", "123555123"], ["updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-02-07 13:12:00: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["to", "4915112341234"], ["updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-02-07 13:12:00: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["to", "4917812341234"], ["updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:12:00: LOCAL_SENT\n"], ["msg_id", "test_array_id_24061149"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["to", "555123555"], ["updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:12:00: LOCAL_SENT\n"], ["msg_id", "test_array_id_63808297"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00], ["to", "123555123"], ["updated_at", Fri, 07 Feb 2014 11:12:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-02-07 13:12:00 +0200 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.2ms) begin transaction  (0.6ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.4ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (2.7ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.1ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.3ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.3ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (15.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:12:34: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:12:34: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:12:34: LOCAL_SENT\n"], ["msg_id", "test_array_id_96102279"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.3ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:12:34: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["to", "123"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["log", "2014-02-07 13:12:34: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["log", "2014-02-07 13:12:34: LOCAL_TEST\n2014-02-07 13:12:34: TEST_2\n"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["log", "2014-02-07 13:12:34: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["log", "2014-02-07 13:12:34: ORIGINAL_STATUS\n2014-02-07 13:12:34: DELIVERED\n"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.1ms) Completed 200 OK in 10ms (Views: 1.4ms | ActiveRecord: 1.2ms) ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["log", "2014-02-07 13:12:34: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["log", "2014-02-07 13:12:34: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["log", "2014-02-07 13:12:34: ORIGINAL_STATUS\n2014-02-07 13:12:34: DELIVERED\n"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["log", "2014-02-07 13:12:34: ORIGINAL_STATUS\n2014-02-07 13:12:34: DELIVERED\n"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 13ms (Views: 0.7ms | ActiveRecord: 2.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.4ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.4ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:34.256285' AND '2014-02-07 11:02:34.256652')  (0.4ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:34.256285' AND '2014-02-07 11:02:34.256652') GROUP BY gateway  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:34.256285' AND '2014-02-07 11:02:34.256652')  (0.2ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:34.256285' AND '2014-02-07 11:02:34.256652') GROUP BY status  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:34.256285' AND '2014-02-07 11:02:34.256652')  (0.2ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:34.256285' AND '2014-02-07 11:02:34.256652') GROUP BY sms_type Completed 200 OK in 39ms (Views: 36.4ms | ActiveRecord: 1.7ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["msg_id", "idtest_1"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.3ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:34.303358' AND '2014-02-07 11:02:34.303670')  (0.2ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:34.303358' AND '2014-02-07 11:02:34.303670') GROUP BY gateway  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:34.303358' AND '2014-02-07 11:02:34.303670')  (0.3ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:34.303358' AND '2014-02-07 11:02:34.303670') GROUP BY status  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:34.303358' AND '2014-02-07 11:02:34.303670')  (0.2ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-01-31 11:12:34.303358' AND '2014-02-07 11:02:34.303670') GROUP BY sms_type Completed 200 OK in 22ms (Views: 19.9ms | ActiveRecord: 1.5ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.5ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 11ms (Views: 9.8ms | ActiveRecord: 0.5ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(params) --------------------------------------------------------------------  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-02-07 13:12:34: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["to", "555123555"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-02-07 13:12:34: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["to", "123555123"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-02-07 13:12:34: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["to", "555123555"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-02-07 13:12:34: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["to", "123555123"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-02-07 13:12:34: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["to", "4915112341234"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-02-07 13:12:34: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["to", "4917812341234"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:12:34: LOCAL_SENT\n"], ["msg_id", "test_array_id_61730185"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["to", "555123555"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-07 13:12:34: LOCAL_SENT\n"], ["msg_id", "test_array_id_48370288"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00], ["to", "123555123"], ["updated_at", Fri, 07 Feb 2014 11:12:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-02-07 13:12:34 +0200 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-11 19:58:42: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["to", "123"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-11 19:58:42: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["to", "123"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-11 19:58:42: LOCAL_SENT\n"], ["msg_id", "test_array_id_90253949"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["to", "123"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-11 19:58:42: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["to", "123"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["log", "2014-02-11 19:58:42: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["log", "2014-02-11 19:58:42: LOCAL_TEST\n2014-02-11 19:58:42: TEST_2\n"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["log", "2014-02-11 19:58:42: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["log", "2014-02-11 19:58:42: ORIGINAL_STATUS\n2014-02-11 19:58:42: DELIVERED\n"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["log", "2014-02-11 19:58:42: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["log", "2014-02-11 19:58:42: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["log", "2014-02-11 19:58:42: ORIGINAL_STATUS\n2014-02-11 19:58:42: DELIVERED\n"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["log", "2014-02-11 19:58:42: ORIGINAL_STATUS\n2014-02-11 19:58:42: DELIVERED\n"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.7ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["msg_id", "idtest_9"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-02-04 17:58:42.553558' AND '2014-02-11 17:48:42.553676')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-02-04 17:58:42.553558' AND '2014-02-11 17:48:42.553676') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-02-04 17:58:42.553558' AND '2014-02-11 17:48:42.553676')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-02-04 17:58:42.553558' AND '2014-02-11 17:48:42.553676') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-02-04 17:58:42.553558' AND '2014-02-11 17:48:42.553676')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-02-04 17:58:42.553558' AND '2014-02-11 17:48:42.553676') GROUP BY sms_type Completed 200 OK in 10ms (Views: 9.9ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["msg_id", "idtest_0"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-02-04 17:58:42.566205' AND '2014-02-11 17:48:42.566306')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-02-04 17:58:42.566205' AND '2014-02-11 17:48:42.566306') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-02-04 17:58:42.566205' AND '2014-02-11 17:48:42.566306')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-02-04 17:58:42.566205' AND '2014-02-11 17:48:42.566306') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-02-04 17:58:42.566205' AND '2014-02-11 17:48:42.566306')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-02-04 17:58:42.566205' AND '2014-02-11 17:48:42.566306') GROUP BY sms_type Completed 200 OK in 7ms (Views: 6.3ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["msg_id", "idtest_1"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(params) --------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-02-11 19:58:42: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-02-11 19:58:42: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-02-11 19:58:42: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-02-11 19:58:42: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-02-11 19:58:42: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-02-11 19:58:42: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-11 19:58:42: LOCAL_SENT\n"], ["msg_id", "test_array_id_15484421"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-02-11 19:58:42: LOCAL_SENT\n"], ["msg_id", "test_array_id_79534176"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 11 Feb 2014 17:58:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-02-11 19:58:42 +0200 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (168.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:03:41: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:03:41: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:03:41: LOCAL_SENT\n"], ["msg_id", "test_array_id_70027616"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:03:41: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["log", "2014-07-29 15:03:41: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["log", "2014-07-29 15:03:41: LOCAL_TEST\n2014-07-29 15:03:41: TEST_2\n"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["log", "2014-07-29 15:03:41: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["log", "2014-07-29 15:03:41: ORIGINAL_STATUS\n2014-07-29 15:03:41: DELIVERED\n"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["log", "2014-07-29 15:03:41: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["log", "2014-07-29 15:03:41: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["log", "2014-07-29 15:03:41: ORIGINAL_STATUS\n2014-07-29 15:03:41: DELIVERED\n"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["log", "2014-07-29 15:03:41: ORIGINAL_STATUS\n2014-07-29 15:03:41: DELIVERED\n"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:41.432565' AND '2014-07-29 11:53:41.432679')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:41.432565' AND '2014-07-29 11:53:41.432679') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:41.432565' AND '2014-07-29 11:53:41.432679')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:41.432565' AND '2014-07-29 11:53:41.432679') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:41.432565' AND '2014-07-29 11:53:41.432679')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:41.432565' AND '2014-07-29 11:53:41.432679') GROUP BY sms_type Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["msg_id", "idtest_1"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:41.444014' AND '2014-07-29 11:53:41.444111')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:41.444014' AND '2014-07-29 11:53:41.444111') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:41.444014' AND '2014-07-29 11:53:41.444111')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:41.444014' AND '2014-07-29 11:53:41.444111') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:41.444014' AND '2014-07-29 11:53:41.444111')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:41.444014' AND '2014-07-29 11:53:41.444111') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 3.2ms | ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(params) --------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-07-29 15:03:41: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-07-29 15:03:41: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-07-29 15:03:41: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-07-29 15:03:41: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-07-29 15:03:41: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-07-29 15:03:41: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:03:41: LOCAL_SENT\n"], ["msg_id", "test_array_id_88715507"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:03:41: LOCAL_SENT\n"], ["msg_id", "test_array_id_47037655"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 29 Jul 2014 12:03:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-07-29 15:03:41 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:03:45: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:03:45: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:03:45: LOCAL_SENT\n"], ["msg_id", "test_array_id_78778073"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:03:45: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["log", "2014-07-29 15:03:45: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["log", "2014-07-29 15:03:45: LOCAL_TEST\n2014-07-29 15:03:45: TEST_2\n"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["log", "2014-07-29 15:03:45: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["log", "2014-07-29 15:03:45: ORIGINAL_STATUS\n2014-07-29 15:03:45: DELIVERED\n"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["log", "2014-07-29 15:03:45: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["log", "2014-07-29 15:03:45: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["log", "2014-07-29 15:03:45: ORIGINAL_STATUS\n2014-07-29 15:03:45: DELIVERED\n"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["log", "2014-07-29 15:03:45: ORIGINAL_STATUS\n2014-07-29 15:03:45: DELIVERED\n"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["msg_id", "idtest_9"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:45.362226' AND '2014-07-29 11:53:45.362393')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:45.362226' AND '2014-07-29 11:53:45.362393') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:45.362226' AND '2014-07-29 11:53:45.362393')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:45.362226' AND '2014-07-29 11:53:45.362393') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:45.362226' AND '2014-07-29 11:53:45.362393')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:45.362226' AND '2014-07-29 11:53:45.362393') GROUP BY sms_type Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:45.374591' AND '2014-07-29 11:53:45.374700')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:45.374591' AND '2014-07-29 11:53:45.374700') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:45.374591' AND '2014-07-29 11:53:45.374700')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:45.374591' AND '2014-07-29 11:53:45.374700') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:45.374591' AND '2014-07-29 11:53:45.374700')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:03:45.374591' AND '2014-07-29 11:53:45.374700') GROUP BY sms_type Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 3.1ms | ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(params) --------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-07-29 15:03:45: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-07-29 15:03:45: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-07-29 15:03:45: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-07-29 15:03:45: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-07-29 15:03:45: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-07-29 15:03:45: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:03:45: LOCAL_SENT\n"], ["msg_id", "test_array_id_49872686"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:03:45: LOCAL_SENT\n"], ["msg_id", "test_array_id_31453689"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 29 Jul 2014 12:03:45 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-07-29 15:03:45 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.1ms) begin transaction  (0.5ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.2ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.1ms) commit transaction  (0.3ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (1.9ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:04:21: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:04:21: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:04:21: LOCAL_SENT\n"], ["msg_id", "test_array_id_48231344"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:04:21: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["log", "2014-07-29 15:04:21: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["log", "2014-07-29 15:04:21: LOCAL_TEST\n2014-07-29 15:04:21: TEST_2\n"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["log", "2014-07-29 15:04:21: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["log", "2014-07-29 15:04:21: ORIGINAL_STATUS\n2014-07-29 15:04:21: DELIVERED\n"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.6ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["log", "2014-07-29 15:04:21: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["log", "2014-07-29 15:04:21: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["log", "2014-07-29 15:04:21: ORIGINAL_STATUS\n2014-07-29 15:04:21: DELIVERED\n"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["log", "2014-07-29 15:04:21: ORIGINAL_STATUS\n2014-07-29 15:04:21: DELIVERED\n"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:04:21.730280' AND '2014-07-29 11:54:21.730425')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:04:21.730280' AND '2014-07-29 11:54:21.730425') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:04:21.730280' AND '2014-07-29 11:54:21.730425')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:04:21.730280' AND '2014-07-29 11:54:21.730425') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:04:21.730280' AND '2014-07-29 11:54:21.730425')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:04:21.730280' AND '2014-07-29 11:54:21.730425') GROUP BY sms_type Completed 200 OK in 12ms (Views: 11.0ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:04:21.743197' AND '2014-07-29 11:54:21.743320')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:04:21.743197' AND '2014-07-29 11:54:21.743320') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:04:21.743197' AND '2014-07-29 11:54:21.743320')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:04:21.743197' AND '2014-07-29 11:54:21.743320') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:04:21.743197' AND '2014-07-29 11:54:21.743320')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:04:21.743197' AND '2014-07-29 11:54:21.743320') GROUP BY sms_type Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.6ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["msg_id", "idtest_8"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["msg_id", "idtest_1"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 2.9ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(params) --------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-07-29 15:04:21: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-07-29 15:04:21: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-07-29 15:04:21: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-07-29 15:04:21: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-07-29 15:04:21: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-07-29 15:04:21: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:04:21: LOCAL_SENT\n"], ["msg_id", "test_array_id_73776347"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:04:21: LOCAL_SENT\n"], ["msg_id", "test_array_id_41521104"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 29 Jul 2014 12:04:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-07-29 15:04:21 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (2.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:08:49: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:08:49: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:08:49: LOCAL_SENT\n"], ["msg_id", "test_array_id_62988354"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:08:49: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["log", "2014-07-29 15:08:49: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["log", "2014-07-29 15:08:49: LOCAL_TEST\n2014-07-29 15:08:49: TEST_2\n"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["log", "2014-07-29 15:08:49: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["log", "2014-07-29 15:08:49: ORIGINAL_STATUS\n2014-07-29 15:08:49: DELIVERED\n"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["log", "2014-07-29 15:08:49: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["log", "2014-07-29 15:08:49: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["log", "2014-07-29 15:08:49: ORIGINAL_STATUS\n2014-07-29 15:08:49: DELIVERED\n"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["log", "2014-07-29 15:08:49: ORIGINAL_STATUS\n2014-07-29 15:08:49: DELIVERED\n"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:08:49.253603' AND '2014-07-29 11:58:49.253767')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:08:49.253603' AND '2014-07-29 11:58:49.253767') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:08:49.253603' AND '2014-07-29 11:58:49.253767')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:08:49.253603' AND '2014-07-29 11:58:49.253767') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:08:49.253603' AND '2014-07-29 11:58:49.253767')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:08:49.253603' AND '2014-07-29 11:58:49.253767') GROUP BY sms_type Completed 200 OK in 10ms (Views: 9.3ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["msg_id", "idtest_1"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:08:49.265397' AND '2014-07-29 11:58:49.265506')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:08:49.265397' AND '2014-07-29 11:58:49.265506') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:08:49.265397' AND '2014-07-29 11:58:49.265506')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:08:49.265397' AND '2014-07-29 11:58:49.265506') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:08:49.265397' AND '2014-07-29 11:58:49.265506')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:08:49.265397' AND '2014-07-29 11:58:49.265506') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 2.9ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(params) --------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-07-29 15:08:49: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-07-29 15:08:49: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-07-29 15:08:49: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-07-29 15:08:49: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-07-29 15:08:49: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-07-29 15:08:49: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:08:49: LOCAL_SENT\n"], ["msg_id", "test_array_id_30355503"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:08:49: LOCAL_SENT\n"], ["msg_id", "test_array_id_32053134"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 29 Jul 2014 12:08:49 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-07-29 15:08:49 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:15:51: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:15:51: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:15:51: LOCAL_SENT\n"], ["msg_id", "test_array_id_44963684"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:15:51: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["to", "123"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["log", "2014-07-29 15:15:51: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["log", "2014-07-29 15:15:51: LOCAL_TEST\n2014-07-29 15:15:51: TEST_2\n"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["log", "2014-07-29 15:15:51: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["log", "2014-07-29 15:15:51: ORIGINAL_STATUS\n2014-07-29 15:15:51: DELIVERED\n"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["log", "2014-07-29 15:15:51: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["log", "2014-07-29 15:15:51: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["log", "2014-07-29 15:15:51: ORIGINAL_STATUS\n2014-07-29 15:15:51: DELIVERED\n"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["log", "2014-07-29 15:15:51: ORIGINAL_STATUS\n2014-07-29 15:15:51: DELIVERED\n"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["msg_id", "idtest_0"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:15:51.673002' AND '2014-07-29 12:05:51.673117')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:15:51.673002' AND '2014-07-29 12:05:51.673117') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:15:51.673002' AND '2014-07-29 12:05:51.673117')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:15:51.673002' AND '2014-07-29 12:05:51.673117') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:15:51.673002' AND '2014-07-29 12:05:51.673117')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:15:51.673002' AND '2014-07-29 12:05:51.673117') GROUP BY sms_type Completed 200 OK in 10ms (Views: 9.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:15:51.685186' AND '2014-07-29 12:05:51.685272')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:15:51.685186' AND '2014-07-29 12:05:51.685272') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:15:51.685186' AND '2014-07-29 12:05:51.685272')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:15:51.685186' AND '2014-07-29 12:05:51.685272') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:15:51.685186' AND '2014-07-29 12:05:51.685272')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-07-22 12:15:51.685186' AND '2014-07-29 12:05:51.685272') GROUP BY sms_type Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["msg_id", "idtest_8"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 3.2ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(params) --------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-07-29 15:15:51: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-07-29 15:15:51: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-07-29 15:15:51: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-07-29 15:15:51: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-07-29 15:15:51: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-07-29 15:15:51: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:15:51: LOCAL_SENT\n"], ["msg_id", "test_array_id_33173206"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-07-29 15:15:51: LOCAL_SENT\n"], ["msg_id", "test_array_id_16850801"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 29 Jul 2014 12:15:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-07-29 15:15:51 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.3ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (2.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:10:44: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:10:44: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:10:44: LOCAL_SENT\n"], ["msg_id", "test_array_id_49131174"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:10:44: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["log", "2014-08-26 20:10:44: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["log", "2014-08-26 20:10:44: LOCAL_TEST\n2014-08-26 20:10:44: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["log", "2014-08-26 20:10:44: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["log", "2014-08-26 20:10:44: ORIGINAL_STATUS\n2014-08-26 20:10:44: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["log", "2014-08-26 20:10:44: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["log", "2014-08-26 20:10:44: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["log", "2014-08-26 20:10:44: ORIGINAL_STATUS\n2014-08-26 20:10:44: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["log", "2014-08-26 20:10:44: ORIGINAL_STATUS\n2014-08-26 20:10:44: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["msg_id", "idtest_0"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:10:44.223435' AND '2014-08-26 17:00:44.223561')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:10:44.223435' AND '2014-08-26 17:00:44.223561') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:10:44.223435' AND '2014-08-26 17:00:44.223561')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:10:44.223435' AND '2014-08-26 17:00:44.223561') GROUP BY status  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:10:44.223435' AND '2014-08-26 17:00:44.223561')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:10:44.223435' AND '2014-08-26 17:00:44.223561') GROUP BY sms_type Completed 200 OK in 12ms (Views: 11.4ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["msg_id", "idtest_8"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:10:44.234828' AND '2014-08-26 17:00:44.234892')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:10:44.234828' AND '2014-08-26 17:00:44.234892') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:10:44.234828' AND '2014-08-26 17:00:44.234892')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:10:44.234828' AND '2014-08-26 17:00:44.234892') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:10:44.234828' AND '2014-08-26 17:00:44.234892')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:10:44.234828' AND '2014-08-26 17:00:44.234892') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["msg_id", "idtest_9"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 9ms (Views: 8.2ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:10:44: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:10:44: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:10:44: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:10:44: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:10:44: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:10:44: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:10:44: LOCAL_SENT\n"], ["msg_id", "test_array_id_15138093"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:10:44: LOCAL_SENT\n"], ["msg_id", "test_array_id_48287536"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:10:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:10:44 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:23: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:23: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:23: LOCAL_SENT\n"], ["msg_id", "test_array_id_92507263"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:23: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["log", "2014-08-26 20:14:23: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["log", "2014-08-26 20:14:23: LOCAL_TEST\n2014-08-26 20:14:23: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["log", "2014-08-26 20:14:23: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["log", "2014-08-26 20:14:23: ORIGINAL_STATUS\n2014-08-26 20:14:23: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["log", "2014-08-26 20:14:23: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["log", "2014-08-26 20:14:23: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["log", "2014-08-26 20:14:23: ORIGINAL_STATUS\n2014-08-26 20:14:23: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["log", "2014-08-26 20:14:23: ORIGINAL_STATUS\n2014-08-26 20:14:23: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.1ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:23.236283' AND '2014-08-26 17:04:23.236406')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:23.236283' AND '2014-08-26 17:04:23.236406') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:23.236283' AND '2014-08-26 17:04:23.236406')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:23.236283' AND '2014-08-26 17:04:23.236406') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:23.236283' AND '2014-08-26 17:04:23.236406')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:23.236283' AND '2014-08-26 17:04:23.236406') GROUP BY sms_type Completed 200 OK in 10ms (Views: 9.3ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:23.247685' AND '2014-08-26 17:04:23.247786')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:23.247685' AND '2014-08-26 17:04:23.247786') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:23.247685' AND '2014-08-26 17:04:23.247786')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:23.247685' AND '2014-08-26 17:04:23.247786') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:23.247685' AND '2014-08-26 17:04:23.247786')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:23.247685' AND '2014-08-26 17:04:23.247786') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["msg_id", "idtest_9"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:14:23: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:14:23: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:14:23: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:14:23: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:14:23: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:14:23: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:23: LOCAL_SENT\n"], ["msg_id", "test_array_id_45851661"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:23: LOCAL_SENT\n"], ["msg_id", "test_array_id_43846251"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:14:23 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:14:23 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:42: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:42: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:42: LOCAL_SENT\n"], ["msg_id", "test_array_id_70283483"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:42: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["log", "2014-08-26 20:14:42: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["log", "2014-08-26 20:14:42: LOCAL_TEST\n2014-08-26 20:14:42: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["log", "2014-08-26 20:14:42: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["log", "2014-08-26 20:14:42: ORIGINAL_STATUS\n2014-08-26 20:14:42: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["log", "2014-08-26 20:14:42: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["log", "2014-08-26 20:14:42: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["log", "2014-08-26 20:14:42: ORIGINAL_STATUS\n2014-08-26 20:14:42: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["log", "2014-08-26 20:14:42: ORIGINAL_STATUS\n2014-08-26 20:14:42: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.1ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Tue, 26 Aug 2014 17:14:42 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:43.004754' AND '2014-08-26 17:04:43.004877')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:43.004754' AND '2014-08-26 17:04:43.004877') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:43.004754' AND '2014-08-26 17:04:43.004877')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:43.004754' AND '2014-08-26 17:04:43.004877') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:43.004754' AND '2014-08-26 17:04:43.004877')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:43.004754' AND '2014-08-26 17:04:43.004877') GROUP BY sms_type Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["msg_id", "idtest_9"], ["updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:43.016458' AND '2014-08-26 17:04:43.016522')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:43.016458' AND '2014-08-26 17:04:43.016522') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:43.016458' AND '2014-08-26 17:04:43.016522')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:43.016458' AND '2014-08-26 17:04:43.016522') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:43.016458' AND '2014-08-26 17:04:43.016522')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:43.016458' AND '2014-08-26 17:04:43.016522') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["msg_id", "idtest_9"], ["updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:14:43: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:14:43: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:14:43: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:14:43: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:14:43: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:14:43: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:43: LOCAL_SENT\n"], ["msg_id", "test_array_id_51752502"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:43: LOCAL_SENT\n"], ["msg_id", "test_array_id_9323832"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:14:43 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:14:43 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:58: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:58: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:58: LOCAL_SENT\n"], ["msg_id", "test_array_id_68809238"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:58: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["log", "2014-08-26 20:14:58: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["log", "2014-08-26 20:14:58: LOCAL_TEST\n2014-08-26 20:14:58: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["log", "2014-08-26 20:14:58: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["log", "2014-08-26 20:14:58: ORIGINAL_STATUS\n2014-08-26 20:14:58: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["log", "2014-08-26 20:14:58: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["log", "2014-08-26 20:14:58: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["log", "2014-08-26 20:14:58: ORIGINAL_STATUS\n2014-08-26 20:14:58: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["log", "2014-08-26 20:14:58: ORIGINAL_STATUS\n2014-08-26 20:14:58: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.1ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["msg_id", "idtest_9"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:58.458430' AND '2014-08-26 17:04:58.458582')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:58.458430' AND '2014-08-26 17:04:58.458582') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:58.458430' AND '2014-08-26 17:04:58.458582')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:58.458430' AND '2014-08-26 17:04:58.458582') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:58.458430' AND '2014-08-26 17:04:58.458582')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:58.458430' AND '2014-08-26 17:04:58.458582') GROUP BY sms_type Completed 200 OK in 10ms (Views: 9.5ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:58.470189' AND '2014-08-26 17:04:58.470261')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:58.470189' AND '2014-08-26 17:04:58.470261') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:58.470189' AND '2014-08-26 17:04:58.470261')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:58.470189' AND '2014-08-26 17:04:58.470261') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:58.470189' AND '2014-08-26 17:04:58.470261')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:14:58.470189' AND '2014-08-26 17:04:58.470261') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["msg_id", "idtest_0"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 2.8ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:14:58: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:14:58: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:14:58: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:14:58: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:14:58: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:14:58: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:58: LOCAL_SENT\n"], ["msg_id", "test_array_id_70239203"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:14:58: LOCAL_SENT\n"], ["msg_id", "test_array_id_2960158"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:14:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:14:58 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:26: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:26: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:26: LOCAL_SENT\n"], ["msg_id", "test_array_id_54079849"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:26: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["log", "2014-08-26 20:15:26: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["log", "2014-08-26 20:15:26: LOCAL_TEST\n2014-08-26 20:15:26: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["log", "2014-08-26 20:15:26: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["log", "2014-08-26 20:15:26: ORIGINAL_STATUS\n2014-08-26 20:15:26: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["log", "2014-08-26 20:15:26: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["log", "2014-08-26 20:15:26: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["log", "2014-08-26 20:15:26: ORIGINAL_STATUS\n2014-08-26 20:15:26: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["log", "2014-08-26 20:15:26: ORIGINAL_STATUS\n2014-08-26 20:15:26: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.1ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:26.807330' AND '2014-08-26 17:05:26.807451')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:26.807330' AND '2014-08-26 17:05:26.807451') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:26.807330' AND '2014-08-26 17:05:26.807451')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:26.807330' AND '2014-08-26 17:05:26.807451') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:26.807330' AND '2014-08-26 17:05:26.807451')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:26.807330' AND '2014-08-26 17:05:26.807451') GROUP BY sms_type Completed 200 OK in 10ms (Views: 9.4ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:26.818764' AND '2014-08-26 17:05:26.818843')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:26.818764' AND '2014-08-26 17:05:26.818843') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:26.818764' AND '2014-08-26 17:05:26.818843')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:26.818764' AND '2014-08-26 17:05:26.818843') GROUP BY status  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:26.818764' AND '2014-08-26 17:05:26.818843')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:26.818764' AND '2014-08-26 17:05:26.818843') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:15:26: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:15:26: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:15:26: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:15:26: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:15:26: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:15:26: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:26: LOCAL_SENT\n"], ["msg_id", "test_array_id_58618819"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:26: LOCAL_SENT\n"], ["msg_id", "test_array_id_35848294"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:15:26 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:15:26 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:38: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:38: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:38: LOCAL_SENT\n"], ["msg_id", "test_array_id_16459846"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:38: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["log", "2014-08-26 20:15:38: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["log", "2014-08-26 20:15:38: LOCAL_TEST\n2014-08-26 20:15:38: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["log", "2014-08-26 20:15:38: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["log", "2014-08-26 20:15:38: ORIGINAL_STATUS\n2014-08-26 20:15:38: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["log", "2014-08-26 20:15:38: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["log", "2014-08-26 20:15:38: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["log", "2014-08-26 20:15:38: ORIGINAL_STATUS\n2014-08-26 20:15:38: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["log", "2014-08-26 20:15:38: ORIGINAL_STATUS\n2014-08-26 20:15:38: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:38.939068' AND '2014-08-26 17:05:38.939180')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:38.939068' AND '2014-08-26 17:05:38.939180') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:38.939068' AND '2014-08-26 17:05:38.939180')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:38.939068' AND '2014-08-26 17:05:38.939180') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:38.939068' AND '2014-08-26 17:05:38.939180')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:38.939068' AND '2014-08-26 17:05:38.939180') GROUP BY sms_type Completed 200 OK in 10ms (Views: 9.5ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["msg_id", "idtest_1"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:38.950952' AND '2014-08-26 17:05:38.951020')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:38.950952' AND '2014-08-26 17:05:38.951020') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:38.950952' AND '2014-08-26 17:05:38.951020')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:38.950952' AND '2014-08-26 17:05:38.951020') GROUP BY status  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:38.950952' AND '2014-08-26 17:05:38.951020')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:38.950952' AND '2014-08-26 17:05:38.951020') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.3ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["msg_id", "idtest_1"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["msg_id", "idtest_8"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:15:38: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:15:38: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:15:38: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:15:38: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:15:38: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:15:38: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:38: LOCAL_SENT\n"], ["msg_id", "test_array_id_86602719"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:38: LOCAL_SENT\n"], ["msg_id", "test_array_id_17260833"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:15:38 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:15:38 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:58: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:58: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:58: LOCAL_SENT\n"], ["msg_id", "test_array_id_23869572"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:58: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["log", "2014-08-26 20:15:58: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["log", "2014-08-26 20:15:58: LOCAL_TEST\n2014-08-26 20:15:58: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["log", "2014-08-26 20:15:58: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["log", "2014-08-26 20:15:58: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["log", "2014-08-26 20:15:58: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["log", "2014-08-26 20:15:58: ORIGINAL_STATUS\n2014-08-26 20:15:58: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["log", "2014-08-26 20:15:58: ORIGINAL_STATUS\n2014-08-26 20:15:58: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["msg_id", "idtest_1"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:58.676989' AND '2014-08-26 17:05:58.677090')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:58.676989' AND '2014-08-26 17:05:58.677090') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:58.676989' AND '2014-08-26 17:05:58.677090')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:58.676989' AND '2014-08-26 17:05:58.677090') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:58.676989' AND '2014-08-26 17:05:58.677090')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:15:58.676989' AND '2014-08-26 17:05:58.677090') GROUP BY sms_type Completed 200 OK in 13ms (Views: 12.1ms | ActiveRecord: 0.6ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["msg_id", "idtest_0"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:58: LOCAL_SENT\n"], ["msg_id", "test_array_id_30758211"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:15:58: LOCAL_SENT\n"], ["msg_id", "test_array_id_66074148"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:15:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:15:58 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) SAVEPOINT active_record_1 SQL (2.7ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:17: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:17: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:17: LOCAL_SENT\n"], ["msg_id", "test_array_id_56591619"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:17: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["log", "2014-08-26 20:16:17: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["log", "2014-08-26 20:16:17: LOCAL_TEST\n2014-08-26 20:16:17: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["log", "2014-08-26 20:16:17: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["log", "2014-08-26 20:16:17: ORIGINAL_STATUS\n2014-08-26 20:16:17: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["log", "2014-08-26 20:16:17: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["log", "2014-08-26 20:16:17: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["log", "2014-08-26 20:16:17: ORIGINAL_STATUS\n2014-08-26 20:16:17: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["log", "2014-08-26 20:16:17: ORIGINAL_STATUS\n2014-08-26 20:16:17: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["msg_id", "idtest_9"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:17.114583' AND '2014-08-26 17:06:17.114701')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:17.114583' AND '2014-08-26 17:06:17.114701') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:17.114583' AND '2014-08-26 17:06:17.114701')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:17.114583' AND '2014-08-26 17:06:17.114701') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:17.114583' AND '2014-08-26 17:06:17.114701')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:17.114583' AND '2014-08-26 17:06:17.114701') GROUP BY sms_type Completed 200 OK in 12ms (Views: 11.6ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:17.129269' AND '2014-08-26 17:06:17.129338')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:17.129269' AND '2014-08-26 17:06:17.129338') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:17.129269' AND '2014-08-26 17:06:17.129338')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:17.129269' AND '2014-08-26 17:06:17.129338') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:17.129269' AND '2014-08-26 17:06:17.129338')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:17.129269' AND '2014-08-26 17:06:17.129338') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["msg_id", "idtest_0"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:16:17: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:16:17: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:16:17: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:16:17: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:16:17: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:16:17: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:17: LOCAL_SENT\n"], ["msg_id", "test_array_id_94080067"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:17: LOCAL_SENT\n"], ["msg_id", "test_array_id_47807791"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:16:17 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:16:17 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.1ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:44: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:44: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:44: LOCAL_SENT\n"], ["msg_id", "test_array_id_53795006"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:44: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["log", "2014-08-26 20:16:44: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["log", "2014-08-26 20:16:44: LOCAL_TEST\n2014-08-26 20:16:44: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["log", "2014-08-26 20:16:44: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["log", "2014-08-26 20:16:44: ORIGINAL_STATUS\n2014-08-26 20:16:44: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["log", "2014-08-26 20:16:44: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["log", "2014-08-26 20:16:44: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["log", "2014-08-26 20:16:44: ORIGINAL_STATUS\n2014-08-26 20:16:44: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["log", "2014-08-26 20:16:44: ORIGINAL_STATUS\n2014-08-26 20:16:44: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:44.281527' AND '2014-08-26 17:06:44.281640')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:44.281527' AND '2014-08-26 17:06:44.281640') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:44.281527' AND '2014-08-26 17:06:44.281640')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:44.281527' AND '2014-08-26 17:06:44.281640') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:44.281527' AND '2014-08-26 17:06:44.281640')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:44.281527' AND '2014-08-26 17:06:44.281640') GROUP BY sms_type Completed 200 OK in 10ms (Views: 9.3ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["msg_id", "idtest_0"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:44.292872' AND '2014-08-26 17:06:44.292935')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:44.292872' AND '2014-08-26 17:06:44.292935') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:44.292872' AND '2014-08-26 17:06:44.292935')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:44.292872' AND '2014-08-26 17:06:44.292935') GROUP BY status  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:44.292872' AND '2014-08-26 17:06:44.292935')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:44.292872' AND '2014-08-26 17:06:44.292935') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:16:44: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:16:44: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:16:44: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:16:44: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:16:44: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:16:44: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:44: LOCAL_SENT\n"], ["msg_id", "test_array_id_26297875"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:44: LOCAL_SENT\n"], ["msg_id", "test_array_id_11815492"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:16:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:16:44 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:52: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:52: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:52: LOCAL_SENT\n"], ["msg_id", "test_array_id_71086929"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:52: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["log", "2014-08-26 20:16:52: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["log", "2014-08-26 20:16:52: LOCAL_TEST\n2014-08-26 20:16:52: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["log", "2014-08-26 20:16:52: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["log", "2014-08-26 20:16:52: ORIGINAL_STATUS\n2014-08-26 20:16:52: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["log", "2014-08-26 20:16:52: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["log", "2014-08-26 20:16:52: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["log", "2014-08-26 20:16:52: ORIGINAL_STATUS\n2014-08-26 20:16:52: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["log", "2014-08-26 20:16:52: ORIGINAL_STATUS\n2014-08-26 20:16:52: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:52.838330' AND '2014-08-26 17:06:52.838455')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:52.838330' AND '2014-08-26 17:06:52.838455') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:52.838330' AND '2014-08-26 17:06:52.838455')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:52.838330' AND '2014-08-26 17:06:52.838455') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:52.838330' AND '2014-08-26 17:06:52.838455')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:52.838330' AND '2014-08-26 17:06:52.838455') GROUP BY sms_type Completed 200 OK in 11ms (Views: 10.6ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["msg_id", "idtest_1"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["msg_id", "idtest_8"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:52.851523' AND '2014-08-26 17:06:52.851588')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:52.851523' AND '2014-08-26 17:06:52.851588') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:52.851523' AND '2014-08-26 17:06:52.851588')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:52.851523' AND '2014-08-26 17:06:52.851588') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:52.851523' AND '2014-08-26 17:06:52.851588')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:16:52.851523' AND '2014-08-26 17:06:52.851588') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 3.1ms | ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:16:52: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:16:52: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:16:52: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:16:52: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:16:52: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:16:52: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:52: LOCAL_SENT\n"], ["msg_id", "test_array_id_71066684"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:16:52: LOCAL_SENT\n"], ["msg_id", "test_array_id_56277745"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:16:52 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:16:52 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:04: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:04: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:04: LOCAL_SENT\n"], ["msg_id", "test_array_id_81852205"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:04: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["log", "2014-08-26 20:17:04: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["log", "2014-08-26 20:17:04: LOCAL_TEST\n2014-08-26 20:17:04: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["log", "2014-08-26 20:17:04: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["log", "2014-08-26 20:17:04: ORIGINAL_STATUS\n2014-08-26 20:17:04: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["log", "2014-08-26 20:17:04: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["log", "2014-08-26 20:17:04: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["log", "2014-08-26 20:17:04: ORIGINAL_STATUS\n2014-08-26 20:17:04: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["log", "2014-08-26 20:17:04: ORIGINAL_STATUS\n2014-08-26 20:17:04: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.1ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["msg_id", "idtest_9"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:04.701313' AND '2014-08-26 17:07:04.701435')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:04.701313' AND '2014-08-26 17:07:04.701435') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:04.701313' AND '2014-08-26 17:07:04.701435')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:04.701313' AND '2014-08-26 17:07:04.701435') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:04.701313' AND '2014-08-26 17:07:04.701435')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:04.701313' AND '2014-08-26 17:07:04.701435') GROUP BY sms_type Completed 200 OK in 10ms (Views: 9.4ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:04.713077' AND '2014-08-26 17:07:04.713159')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:04.713077' AND '2014-08-26 17:07:04.713159') GROUP BY gateway  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:04.713077' AND '2014-08-26 17:07:04.713159')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:04.713077' AND '2014-08-26 17:07:04.713159') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:04.713077' AND '2014-08-26 17:07:04.713159')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:04.713077' AND '2014-08-26 17:07:04.713159') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:17:04: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:17:04: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:17:04: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:17:04: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:17:04: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:17:04: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:04: LOCAL_SENT\n"], ["msg_id", "test_array_id_33709859"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:04: LOCAL_SENT\n"], ["msg_id", "test_array_id_99579374"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:17:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:17:04 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.1ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:08: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:08: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:08: LOCAL_SENT\n"], ["msg_id", "test_array_id_11011442"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:08: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00], ["log", "2014-08-26 20:17:08: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00], ["log", "2014-08-26 20:17:08: LOCAL_TEST\n2014-08-26 20:17:08: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00], ["log", "2014-08-26 20:17:08: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:08 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["log", "2014-08-26 20:17:08: ORIGINAL_STATUS\n2014-08-26 20:17:09: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["log", "2014-08-26 20:17:09: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["log", "2014-08-26 20:17:09: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["log", "2014-08-26 20:17:09: ORIGINAL_STATUS\n2014-08-26 20:17:09: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["log", "2014-08-26 20:17:09: ORIGINAL_STATUS\n2014-08-26 20:17:09: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:09.018866' AND '2014-08-26 17:07:09.018980')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:09.018866' AND '2014-08-26 17:07:09.018980') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:09.018866' AND '2014-08-26 17:07:09.018980')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:09.018866' AND '2014-08-26 17:07:09.018980') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:09.018866' AND '2014-08-26 17:07:09.018980')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:09.018866' AND '2014-08-26 17:07:09.018980') GROUP BY sms_type Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["msg_id", "idtest_0"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["msg_id", "idtest_8"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:09.030251' AND '2014-08-26 17:07:09.030322')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:09.030251' AND '2014-08-26 17:07:09.030322') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:09.030251' AND '2014-08-26 17:07:09.030322')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:09.030251' AND '2014-08-26 17:07:09.030322') GROUP BY status  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:09.030251' AND '2014-08-26 17:07:09.030322')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:09.030251' AND '2014-08-26 17:07:09.030322') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["msg_id", "idtest_8"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:17:09: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:17:09: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:17:09: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:17:09: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:17:09: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:17:09: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:09: LOCAL_SENT\n"], ["msg_id", "test_array_id_82084623"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:09: LOCAL_SENT\n"], ["msg_id", "test_array_id_36157657"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:17:09 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:17:09 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:15: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:15: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:15: LOCAL_SENT\n"], ["msg_id", "test_array_id_82749881"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:15: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["log", "2014-08-26 20:17:15: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["log", "2014-08-26 20:17:15: LOCAL_TEST\n2014-08-26 20:17:15: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["log", "2014-08-26 20:17:15: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["log", "2014-08-26 20:17:15: ORIGINAL_STATUS\n2014-08-26 20:17:15: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["log", "2014-08-26 20:17:15: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["log", "2014-08-26 20:17:15: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["log", "2014-08-26 20:17:15: ORIGINAL_STATUS\n2014-08-26 20:17:15: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["log", "2014-08-26 20:17:15: ORIGINAL_STATUS\n2014-08-26 20:17:15: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:15.064904' AND '2014-08-26 17:07:15.065015')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:15.064904' AND '2014-08-26 17:07:15.065015') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:15.064904' AND '2014-08-26 17:07:15.065015')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:15.064904' AND '2014-08-26 17:07:15.065015') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:15.064904' AND '2014-08-26 17:07:15.065015')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:15.064904' AND '2014-08-26 17:07:15.065015') GROUP BY sms_type Completed 200 OK in 10ms (Views: 9.6ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["msg_id", "idtest_8"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:15.076879' AND '2014-08-26 17:07:15.076948')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:15.076879' AND '2014-08-26 17:07:15.076948') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:15.076879' AND '2014-08-26 17:07:15.076948')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:15.076879' AND '2014-08-26 17:07:15.076948') GROUP BY status  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:15.076879' AND '2014-08-26 17:07:15.076948')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:15.076879' AND '2014-08-26 17:07:15.076948') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["msg_id", "idtest_9"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 4ms (Views: 3.4ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:17:15: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:17:15: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:17:15: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:17:15: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:17:15: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:17:15: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:15: LOCAL_SENT\n"], ["msg_id", "test_array_id_52641995"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:15: LOCAL_SENT\n"], ["msg_id", "test_array_id_15611607"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:17:15 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:17:15 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:25: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:25: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:25: LOCAL_SENT\n"], ["msg_id", "test_array_id_45871288"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:25: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["log", "2014-08-26 20:17:25: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["log", "2014-08-26 20:17:25: LOCAL_TEST\n2014-08-26 20:17:25: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["log", "2014-08-26 20:17:25: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["log", "2014-08-26 20:17:25: ORIGINAL_STATUS\n2014-08-26 20:17:25: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["log", "2014-08-26 20:17:25: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["log", "2014-08-26 20:17:25: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["log", "2014-08-26 20:17:25: ORIGINAL_STATUS\n2014-08-26 20:17:25: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["log", "2014-08-26 20:17:25: ORIGINAL_STATUS\n2014-08-26 20:17:25: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:25.579265' AND '2014-08-26 17:07:25.579384')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:25.579265' AND '2014-08-26 17:07:25.579384') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:25.579265' AND '2014-08-26 17:07:25.579384')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:25.579265' AND '2014-08-26 17:07:25.579384') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:25.579265' AND '2014-08-26 17:07:25.579384')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:25.579265' AND '2014-08-26 17:07:25.579384') GROUP BY sms_type Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.6ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["msg_id", "idtest_8"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["msg_id", "idtest_6"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:25.592148' AND '2014-08-26 17:07:25.592216')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:25.592148' AND '2014-08-26 17:07:25.592216') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:25.592148' AND '2014-08-26 17:07:25.592216')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:25.592148' AND '2014-08-26 17:07:25.592216') GROUP BY status  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:25.592148' AND '2014-08-26 17:07:25.592216')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:17:25.592148' AND '2014-08-26 17:07:25.592216') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["msg_id", "idtest_9"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 4ms (Views: 3.4ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:17:25: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:17:25: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:17:25: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:17:25: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:17:25: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:17:25: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:25: LOCAL_SENT\n"], ["msg_id", "test_array_id_68245851"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:17:25: LOCAL_SENT\n"], ["msg_id", "test_array_id_51526151"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:17:25 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:17:25 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.1ms) begin transaction  (0.4ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.2ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (2.9ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:18:41: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:18:41: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:18:41: LOCAL_SENT\n"], ["msg_id", "test_array_id_54659097"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.3ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:18:41: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["log", "2014-08-26 20:18:41: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["log", "2014-08-26 20:18:41: LOCAL_TEST\n2014-08-26 20:18:41: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["log", "2014-08-26 20:18:41: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["log", "2014-08-26 20:18:41: ORIGINAL_STATUS\n2014-08-26 20:18:41: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["log", "2014-08-26 20:18:41: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["log", "2014-08-26 20:18:41: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["log", "2014-08-26 20:18:41: ORIGINAL_STATUS\n2014-08-26 20:18:41: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["log", "2014-08-26 20:18:41: ORIGINAL_STATUS\n2014-08-26 20:18:41: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:18:41.364349' AND '2014-08-26 17:08:41.364448')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:18:41.364349' AND '2014-08-26 17:08:41.364448') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:18:41.364349' AND '2014-08-26 17:08:41.364448')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:18:41.364349' AND '2014-08-26 17:08:41.364448') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:18:41.364349' AND '2014-08-26 17:08:41.364448')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:18:41.364349' AND '2014-08-26 17:08:41.364448') GROUP BY sms_type Completed 200 OK in 9ms (Views: 8.5ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:18:41.375749' AND '2014-08-26 17:08:41.375823')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:18:41.375749' AND '2014-08-26 17:08:41.375823') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:18:41.375749' AND '2014-08-26 17:08:41.375823')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:18:41.375749' AND '2014-08-26 17:08:41.375823') GROUP BY status  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:18:41.375749' AND '2014-08-26 17:08:41.375823')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:18:41.375749' AND '2014-08-26 17:08:41.375823') GROUP BY sms_type Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["msg_id", "idtest_9"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 2.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:18:41: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:18:41: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:18:41: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:18:41: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:18:41: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:18:41: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:18:41: LOCAL_SENT\n"], ["msg_id", "test_array_id_34473373"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:18:41: LOCAL_SENT\n"], ["msg_id", "test_array_id_88209347"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:18:41 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:18:41 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.1ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:19:19: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:19:19: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:19:19: LOCAL_SENT\n"], ["msg_id", "test_array_id_75781757"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:19:19: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["to", "123"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["log", "2014-08-26 20:19:19: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["log", "2014-08-26 20:19:19: LOCAL_TEST\n2014-08-26 20:19:19: TEST_2\n"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["log", "2014-08-26 20:19:19: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["log", "2014-08-26 20:19:19: ORIGINAL_STATUS\n2014-08-26 20:19:19: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["log", "2014-08-26 20:19:19: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["log", "2014-08-26 20:19:19: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["log", "2014-08-26 20:19:19: ORIGINAL_STATUS\n2014-08-26 20:19:19: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["log", "2014-08-26 20:19:19: ORIGINAL_STATUS\n2014-08-26 20:19:19: DELIVERED\n"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["msg_id", "idtest_9"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:19:19.216709' AND '2014-08-26 17:09:19.216818')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:19:19.216709' AND '2014-08-26 17:09:19.216818') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:19:19.216709' AND '2014-08-26 17:09:19.216818')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:19:19.216709' AND '2014-08-26 17:09:19.216818') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:19:19.216709' AND '2014-08-26 17:09:19.216818')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:19:19.216709' AND '2014-08-26 17:09:19.216818') GROUP BY sms_type Completed 200 OK in 10ms (Views: 9.7ms | ActiveRecord: 0.6ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["msg_id", "idtest_3"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["msg_id", "idtest_4"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:19:19.228485' AND '2014-08-26 17:09:19.228541')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:19:19.228485' AND '2014-08-26 17:09:19.228541') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:19:19.228485' AND '2014-08-26 17:09:19.228541')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:19:19.228485' AND '2014-08-26 17:09:19.228541') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:19:19.228485' AND '2014-08-26 17:09:19.228541')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-08-19 17:19:19.228485' AND '2014-08-26 17:09:19.228541') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["msg_id", "idtest_1"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["msg_id", "idtest_0"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:19:19: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-08-26 20:19:19: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:19:19: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-08-26 20:19:19: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:19:19: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["to", "4915112341234"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-08-26 20:19:19: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["to", "4917812341234"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:19:19: LOCAL_SENT\n"], ["msg_id", "test_array_id_88031479"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["to", "555123555"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-08-26 20:19:19: LOCAL_SENT\n"], ["msg_id", "test_array_id_8257034"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00], ["to", "123555123"], ["updated_at", Tue, 26 Aug 2014 17:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-08-26 20:19:19 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "gateway" varchar(255), "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (2.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-10-06 15:34:54: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["to", "123"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-10-06 15:34:54: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["to", "123"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", true], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-10-06 15:34:54: LOCAL_SENT\n"], ["msg_id", "test_array_id_30716271"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["to", "123"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-10-06 15:34:54: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["to", "123"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["log", "2014-10-06 15:34:54: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "TEST_2"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["log", "2014-10-06 15:34:54: LOCAL_TEST\n2014-10-06 15:34:54: TEST_2\n"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["log", "2014-10-06 15:34:54: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["log", "2014-10-06 15:34:54: ORIGINAL_STATUS\n2014-10-06 15:34:54: DELIVERED\n"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["log", "2014-10-06 15:34:54: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["log", "2014-10-06 15:34:54: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["status", "DELIVERED"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["log", "2014-10-06 15:34:54: ORIGINAL_STATUS\n2014-10-06 15:34:54: DELIVERED\n"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["status", "DELIVERED"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["log", "2014-10-06 15:34:54: ORIGINAL_STATUS\n2014-10-06 15:34:54: DELIVERED\n"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["msg_id", "idtest_8"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["msg_id", "idtest_5"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-09-29 12:34:54.303712' AND '2014-10-06 12:24:54.303852')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-09-29 12:34:54.303712' AND '2014-10-06 12:24:54.303852') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-09-29 12:34:54.303712' AND '2014-10-06 12:24:54.303852')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-09-29 12:34:54.303712' AND '2014-10-06 12:24:54.303852') GROUP BY status  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-09-29 12:34:54.303712' AND '2014-10-06 12:24:54.303852')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-09-29 12:34:54.303712' AND '2014-10-06 12:24:54.303852') GROUP BY sms_type Completed 200 OK in 10ms (Views: 9.3ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["msg_id", "idtest_0"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-09-29 12:34:54.314145' AND '2014-10-06 12:24:54.314207')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-09-29 12:34:54.314145' AND '2014-10-06 12:24:54.314207') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-09-29 12:34:54.314145' AND '2014-10-06 12:24:54.314207')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-09-29 12:34:54.314145' AND '2014-10-06 12:24:54.314207') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-09-29 12:34:54.314145' AND '2014-10-06 12:24:54.314207')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2014-09-29 12:34:54.314145' AND '2014-10-06 12:24:54.314207') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["msg_id", "idtest_2"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["msg_id", "idtest_7"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 2.9ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-10-06 15:34:54: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["to", "555123555"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["from", "555666"], ["gateway", "nexmo"], ["log", "2014-10-06 15:34:54: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["to", "123555123"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-10-06 15:34:54: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["to", "555123555"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["from", "555666"], ["gateway", "simple_http"], ["log", "2014-10-06 15:34:54: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["to", "123555123"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-10-06 15:34:54: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["to", "4915112341234"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2014-10-06 15:34:54: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["to", "4917812341234"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-10-06 15:34:54: LOCAL_SENT\n"], ["msg_id", "test_array_id_91618489"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["to", "555123555"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["from", "555666"], ["gateway", "test_array"], ["log", "2014-10-06 15:34:54: LOCAL_SENT\n"], ["msg_id", "test_array_id_52484433"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00], ["to", "123555123"], ["updated_at", Mon, 06 Oct 2014 12:34:54 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2014-10-06 15:34:54 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)   (0.1ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)  (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_action_smser_delivery_reports_on_msg_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_action_smser_delivery_reports_on_msg_id' AND type='index'   (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)   (0.1ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)  (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_action_smser_delivery_reports_on_msg_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_action_smser_delivery_reports_on_msg_id' AND type='index'   (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)   (0.1ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)  (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_action_smser_delivery_reports_on_msg_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_action_smser_delivery_reports_on_msg_id' AND type='index'   (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)   (0.0ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)   (0.1ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)  (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_action_smser_delivery_reports_on_msg_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_action_smser_delivery_reports_on_msg_id' AND type='index'   (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)   (0.1ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.0ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_87570751"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:32.366351"], ["log", "2015-04-15 22:45:32: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:32.366857"], ["updated_at", "2015-04-15 19:45:32.366857"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_49668173"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:32.368192"], ["log", "2015-04-15 22:45:32: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:32.368478"], ["updated_at", "2015-04-15 19:45:32.368478"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-15 19:45:32.386955"], ["log", "2015-04-15 22:45:32: ORIGINAL_STATUS\n"], ["created_at", "2015-04-15 19:45:32.387553"], ["updated_at", "2015-04-15 19:45:32.387553"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-15 19:45:32.389514"], ["log", "2015-04-15 22:45:32: ORIGINAL_STATUS\n"], ["created_at", "2015-04-15 19:45:32.389886"], ["updated_at", "2015-04-15 19:45:32.389886"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-15 19:45:32.390986"], ["log", "2015-04-15 22:45:32: ORIGINAL_STATUS\n"], ["created_at", "2015-04-15 19:45:32.391279"], ["updated_at", "2015-04-15 19:45:32.391279"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-15 19:45:32.396477"], ["log", "2015-04-15 22:45:32: ORIGINAL_STATUS\n2015-04-15 22:45:32: DELIVERED\n"], ["updated_at", "2015-04-15 19:45:32.396937"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-15 19:45:32.398862"], ["log", "2015-04-15 22:45:32: ORIGINAL_STATUS\n2015-04-15 22:45:32: DELIVERED\n"], ["updated_at", "2015-04-15 19:45:32.399215"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 6ms (Views: 0.4ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-15 19:45:32.407832"], ["updated_at", "2015-04-15 19:45:32.407832"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-15 19:45:32.409483"], ["updated_at", "2015-04-15 19:45:32.409483"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:32.414588' AND '2015-04-15 19:35:32.414749')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:32.414588' AND '2015-04-15 19:35:32.414749') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:32.414588' AND '2015-04-15 19:35:32.414749')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:32.414588' AND '2015-04-15 19:35:32.414749') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:32.414588' AND '2015-04-15 19:35:32.414749')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:32.414588' AND '2015-04-15 19:35:32.414749') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (10.2ms) Completed 200 OK in 13ms (Views: 11.8ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-15 19:45:32.425555"], ["updated_at", "2015-04-15 19:45:32.425555"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-15 19:45:32.426748"], ["updated_at", "2015-04-15 19:45:32.426748"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-15 19:45:32.430414"], ["updated_at", "2015-04-15 19:45:32.430414"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-15 19:45:32.431501"], ["updated_at", "2015-04-15 19:45:32.431501"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:32.441855"], ["log", "2015-04-15 22:45:32: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:32.442209"], ["updated_at", "2015-04-15 19:45:32.442209"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:32.444147"], ["log", "2015-04-15 22:45:32: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:32.444489"], ["updated_at", "2015-04-15 19:45:32.444489"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-15 19:45:32.445683"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-15 19:45:32.447743"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_27530626"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:32.448944"], ["log", "2015-04-15 22:45:32: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:32.449292"], ["updated_at", "2015-04-15 19:45:32.449292"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:32.460631"], ["log", "2015-04-15 22:45:32: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:32.461051"], ["updated_at", "2015-04-15 19:45:32.461051"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-15 19:45:32.462670"], ["log", "2015-04-15 22:45:32: LOCAL_TEST\n"], ["created_at", "2015-04-15 19:45:32.463002"], ["updated_at", "2015-04-15 19:45:32.463002"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-15 19:45:32.468837"], ["log", "2015-04-15 22:45:32: LOCAL_TEST\n2015-04-15 22:45:32: TEST_2\n"], ["updated_at", "2015-04-15 19:45:32.469233"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.1ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_50019458"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:40.691637"], ["log", "2015-04-15 22:45:40: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:40.692240"], ["updated_at", "2015-04-15 19:45:40.692240"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_34085681"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:40.693496"], ["log", "2015-04-15 22:45:40: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:40.693787"], ["updated_at", "2015-04-15 19:45:40.693787"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-15 19:45:40.698212"], ["log", "2015-04-15 22:45:40: ORIGINAL_STATUS\n"], ["created_at", "2015-04-15 19:45:40.698631"], ["updated_at", "2015-04-15 19:45:40.698631"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-15 19:45:40.700251"], ["log", "2015-04-15 22:45:40: ORIGINAL_STATUS\n"], ["created_at", "2015-04-15 19:45:40.700614"], ["updated_at", "2015-04-15 19:45:40.700614"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-15 19:45:40.701737"], ["log", "2015-04-15 22:45:40: ORIGINAL_STATUS\n"], ["created_at", "2015-04-15 19:45:40.702073"], ["updated_at", "2015-04-15 19:45:40.702073"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-15 19:45:40.707859"], ["log", "2015-04-15 22:45:40: ORIGINAL_STATUS\n2015-04-15 22:45:40: DELIVERED\n"], ["updated_at", "2015-04-15 19:45:40.708429"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-15 19:45:40.710559"], ["log", "2015-04-15 22:45:40: ORIGINAL_STATUS\n2015-04-15 22:45:40: DELIVERED\n"], ["updated_at", "2015-04-15 19:45:40.710972"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 7ms (Views: 0.6ms | ActiveRecord: 0.6ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-15 19:45:40.719929"], ["updated_at", "2015-04-15 19:45:40.719929"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-15 19:45:40.721139"], ["updated_at", "2015-04-15 19:45:40.721139"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:40.725507' AND '2015-04-15 19:35:40.725622')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:40.725507' AND '2015-04-15 19:35:40.725622') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:40.725507' AND '2015-04-15 19:35:40.725622')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:40.725507' AND '2015-04-15 19:35:40.725622') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:40.725507' AND '2015-04-15 19:35:40.725622')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:40.725507' AND '2015-04-15 19:35:40.725622') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (9.4ms) Completed 200 OK in 12ms (Views: 10.8ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-15 19:45:40.736292"], ["updated_at", "2015-04-15 19:45:40.736292"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-15 19:45:40.737791"], ["updated_at", "2015-04-15 19:45:40.737791"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-15 19:45:40.741997"], ["updated_at", "2015-04-15 19:45:40.741997"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-15 19:45:40.743050"], ["updated_at", "2015-04-15 19:45:40.743050"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:40.747901"], ["log", "2015-04-15 22:45:40: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:40.748494"], ["updated_at", "2015-04-15 19:45:40.748494"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:40.751329"], ["log", "2015-04-15 22:45:40: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:40.751778"], ["updated_at", "2015-04-15 19:45:40.751778"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-15 19:45:40.753338"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-15 19:45:40.755257"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_807196"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:40.756560"], ["log", "2015-04-15 22:45:40: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:40.756909"], ["updated_at", "2015-04-15 19:45:40.756909"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:40.769261"], ["log", "2015-04-15 22:45:40: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:40.769736"], ["updated_at", "2015-04-15 19:45:40.769736"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-15 19:45:40.771717"], ["log", "2015-04-15 22:45:40: LOCAL_TEST\n"], ["created_at", "2015-04-15 19:45:40.772087"], ["updated_at", "2015-04-15 19:45:40.772087"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-15 19:45:40.773012"], ["log", "2015-04-15 22:45:40: LOCAL_TEST\n2015-04-15 22:45:40: TEST_2\n"], ["updated_at", "2015-04-15 19:45:40.773369"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (5.7ms) rollback transaction  (0.2ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.0ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:57.693146"], ["log", "2015-04-15 22:45:57: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:57.693537"], ["updated_at", "2015-04-15 19:45:57.693537"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:57.695277"], ["log", "2015-04-15 22:45:57: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:57.695581"], ["updated_at", "2015-04-15 19:45:57.695581"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-15 19:45:57.696562"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-15 19:45:57.699971"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_38845945"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:57.701438"], ["log", "2015-04-15 22:45:57: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:57.701809"], ["updated_at", "2015-04-15 19:45:57.701809"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:57.711667"], ["log", "2015-04-15 22:45:57: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:57.712054"], ["updated_at", "2015-04-15 19:45:57.712054"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-15 19:45:57.713795"], ["log", "2015-04-15 22:45:57: LOCAL_TEST\n"], ["created_at", "2015-04-15 19:45:57.714091"], ["updated_at", "2015-04-15 19:45:57.714091"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-15 19:45:57.714833"], ["log", "2015-04-15 22:45:57: LOCAL_TEST\n2015-04-15 22:45:57: TEST_2\n"], ["updated_at", "2015-04-15 19:45:57.715086"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_84946881"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:57.729030"], ["log", "2015-04-15 22:45:57: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:57.729459"], ["updated_at", "2015-04-15 19:45:57.729459"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_92681031"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:45:57.730541"], ["log", "2015-04-15 22:45:57: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:45:57.730835"], ["updated_at", "2015-04-15 19:45:57.730835"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-15 19:45:57.734602"], ["log", "2015-04-15 22:45:57: ORIGINAL_STATUS\n"], ["created_at", "2015-04-15 19:45:57.734951"], ["updated_at", "2015-04-15 19:45:57.734951"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-15 19:45:57.736371"], ["log", "2015-04-15 22:45:57: ORIGINAL_STATUS\n"], ["created_at", "2015-04-15 19:45:57.736645"], ["updated_at", "2015-04-15 19:45:57.736645"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-15 19:45:57.737381"], ["log", "2015-04-15 22:45:57: ORIGINAL_STATUS\n"], ["created_at", "2015-04-15 19:45:57.737635"], ["updated_at", "2015-04-15 19:45:57.737635"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-15 19:45:57.741155"], ["log", "2015-04-15 22:45:57: ORIGINAL_STATUS\n2015-04-15 22:45:57: DELIVERED\n"], ["updated_at", "2015-04-15 19:45:57.741718"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-15 19:45:57.743277"], ["log", "2015-04-15 22:45:57: ORIGINAL_STATUS\n2015-04-15 22:45:57: DELIVERED\n"], ["updated_at", "2015-04-15 19:45:57.743690"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-15 19:45:57.750822"], ["updated_at", "2015-04-15 19:45:57.750822"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-15 19:45:57.751845"], ["updated_at", "2015-04-15 19:45:57.751845"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:57.755822' AND '2015-04-15 19:35:57.755937')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:57.755822' AND '2015-04-15 19:35:57.755937') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:57.755822' AND '2015-04-15 19:35:57.755937')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:57.755822' AND '2015-04-15 19:35:57.755937') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:57.755822' AND '2015-04-15 19:35:57.755937')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:45:57.755822' AND '2015-04-15 19:35:57.755937') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (6.8ms) Completed 200 OK in 9ms (Views: 8.2ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-15 19:45:57.763189"], ["updated_at", "2015-04-15 19:45:57.763189"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-15 19:45:57.764450"], ["updated_at", "2015-04-15 19:45:57.764450"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-15 19:45:57.768610"], ["updated_at", "2015-04-15 19:45:57.768610"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-15 19:45:57.774568"], ["updated_at", "2015-04-15 19:45:57.774568"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.0ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-15 19:47:35.075392"], ["log", "2015-04-15 22:47:35: ORIGINAL_STATUS\n"], ["created_at", "2015-04-15 19:47:35.076304"], ["updated_at", "2015-04-15 19:47:35.076304"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-15 19:47:35.078771"], ["log", "2015-04-15 22:47:35: ORIGINAL_STATUS\n"], ["created_at", "2015-04-15 19:47:35.079152"], ["updated_at", "2015-04-15 19:47:35.079152"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-15 19:47:35.080315"], ["log", "2015-04-15 22:47:35: ORIGINAL_STATUS\n"], ["created_at", "2015-04-15 19:47:35.080648"], ["updated_at", "2015-04-15 19:47:35.080648"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-15 19:47:35.085862"], ["log", "2015-04-15 22:47:35: ORIGINAL_STATUS\n2015-04-15 22:47:35: DELIVERED\n"], ["updated_at", "2015-04-15 19:47:35.086430"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-15 19:47:35.088698"], ["log", "2015-04-15 22:47:35: ORIGINAL_STATUS\n2015-04-15 22:47:35: DELIVERED\n"], ["updated_at", "2015-04-15 19:47:35.089162"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 7ms (Views: 0.5ms | ActiveRecord: 0.6ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-15 19:47:35.098861"], ["updated_at", "2015-04-15 19:47:35.098861"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-15 19:47:35.100298"], ["updated_at", "2015-04-15 19:47:35.100298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:47:35.104774' AND '2015-04-15 19:37:35.104887')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:47:35.104774' AND '2015-04-15 19:37:35.104887') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:47:35.104774' AND '2015-04-15 19:37:35.104887')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:47:35.104774' AND '2015-04-15 19:37:35.104887') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:47:35.104774' AND '2015-04-15 19:37:35.104887')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:47:35.104774' AND '2015-04-15 19:37:35.104887') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (9.4ms) Completed 200 OK in 12ms (Views: 10.8ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-15 19:47:35.114917"], ["updated_at", "2015-04-15 19:47:35.114917"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-15 19:47:35.116142"], ["updated_at", "2015-04-15 19:47:35.116142"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-15 19:47:35.119670"], ["updated_at", "2015-04-15 19:47:35.119670"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-15 19:47:35.120765"], ["updated_at", "2015-04-15 19:47:35.120765"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:47:35.124744"], ["log", "2015-04-15 22:47:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:47:35.125068"], ["updated_at", "2015-04-15 19:47:35.125068"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:47:35.126855"], ["log", "2015-04-15 22:47:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:47:35.127188"], ["updated_at", "2015-04-15 19:47:35.127188"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-15 19:47:35.128355"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-15 19:47:35.130272"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_71781001"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:47:35.131748"], ["log", "2015-04-15 22:47:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:47:35.132155"], ["updated_at", "2015-04-15 19:47:35.132155"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.3ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:47:35.145188"], ["log", "2015-04-15 22:47:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:47:35.145662"], ["updated_at", "2015-04-15 19:47:35.145662"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-15 19:47:35.147841"], ["log", "2015-04-15 22:47:35: LOCAL_TEST\n"], ["created_at", "2015-04-15 19:47:35.148218"], ["updated_at", "2015-04-15 19:47:35.148218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-15 19:47:35.149297"], ["log", "2015-04-15 22:47:35: LOCAL_TEST\n2015-04-15 22:47:35: TEST_2\n"], ["updated_at", "2015-04-15 19:47:35.149632"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_55460099"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:47:35.156991"], ["log", "2015-04-15 22:47:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:47:35.157447"], ["updated_at", "2015-04-15 19:47:35.157447"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (5.8ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_95828886"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:47:35.158704"], ["log", "2015-04-15 22:47:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:47:35.159087"], ["updated_at", "2015-04-15 19:47:35.159087"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.0ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.1ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_3034903"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:48:08.012284"], ["log", "2015-04-15 22:48:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:48:08.013049"], ["updated_at", "2015-04-15 19:48:08.013049"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_54132792"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:48:08.014692"], ["log", "2015-04-15 22:48:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:48:08.015056"], ["updated_at", "2015-04-15 19:48:08.015056"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:48:08.020361"], ["log", "2015-04-15 22:48:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:48:08.020718"], ["updated_at", "2015-04-15 19:48:08.020718"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:48:08.022405"], ["log", "2015-04-15 22:48:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:48:08.022707"], ["updated_at", "2015-04-15 19:48:08.022707"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-15 19:48:08.023764"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-15 19:48:08.027984"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_71258821"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:48:08.029331"], ["log", "2015-04-15 22:48:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:48:08.029701"], ["updated_at", "2015-04-15 19:48:08.029701"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-15 19:48:08.039041"], ["log", "2015-04-15 22:48:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-15 19:48:08.039452"], ["updated_at", "2015-04-15 19:48:08.039452"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-15 19:48:08.041061"], ["log", "2015-04-15 22:48:08: LOCAL_TEST\n"], ["created_at", "2015-04-15 19:48:08.041466"], ["updated_at", "2015-04-15 19:48:08.041466"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-15 19:48:08.042375"], ["log", "2015-04-15 22:48:08: LOCAL_TEST\n2015-04-15 22:48:08: TEST_2\n"], ["updated_at", "2015-04-15 19:48:08.042643"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-15 19:48:08.044628"], ["log", "2015-04-15 22:48:08: ORIGINAL_STATUS\n"], ["created_at", "2015-04-15 19:48:08.044961"], ["updated_at", "2015-04-15 19:48:08.044961"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-15 19:48:08.046298"], ["log", "2015-04-15 22:48:08: ORIGINAL_STATUS\n"], ["created_at", "2015-04-15 19:48:08.046574"], ["updated_at", "2015-04-15 19:48:08.046574"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-15 19:48:08.047492"], ["log", "2015-04-15 22:48:08: ORIGINAL_STATUS\n"], ["created_at", "2015-04-15 19:48:08.047749"], ["updated_at", "2015-04-15 19:48:08.047749"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-15 19:48:08.052159"], ["log", "2015-04-15 22:48:08: ORIGINAL_STATUS\n2015-04-15 22:48:08: DELIVERED\n"], ["updated_at", "2015-04-15 19:48:08.052946"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-15 19:48:08.054677"], ["log", "2015-04-15 22:48:08: ORIGINAL_STATUS\n2015-04-15 22:48:08: DELIVERED\n"], ["updated_at", "2015-04-15 19:48:08.055078"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.7ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-15 19:48:08.063784"], ["updated_at", "2015-04-15 19:48:08.063784"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-15 19:48:08.065063"], ["updated_at", "2015-04-15 19:48:08.065063"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:48:08.070810' AND '2015-04-15 19:38:08.070985')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:48:08.070810' AND '2015-04-15 19:38:08.070985') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:48:08.070810' AND '2015-04-15 19:38:08.070985')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:48:08.070810' AND '2015-04-15 19:38:08.070985') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:48:08.070810' AND '2015-04-15 19:38:08.070985')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-08 19:48:08.070810' AND '2015-04-15 19:38:08.070985') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (9.3ms) Completed 200 OK in 12ms (Views: 11.2ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-15 19:48:08.079896"], ["updated_at", "2015-04-15 19:48:08.079896"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-15 19:48:08.081147"], ["updated_at", "2015-04-15 19:48:08.081147"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-15 19:48:08.084990"], ["updated_at", "2015-04-15 19:48:08.084990"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-15 19:48:08.086258"], ["updated_at", "2015-04-15 19:48:08.086258"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.1ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_47419347"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:01:44.318161"], ["log", "2015-04-22 14:01:44: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:01:44.318785"], ["updated_at", "2015-04-22 11:01:44.318785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_30270063"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:01:44.320607"], ["log", "2015-04-22 14:01:44: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:01:44.320915"], ["updated_at", "2015-04-22 11:01:44.320915"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:01:44.324486"], ["log", "2015-04-22 14:01:44: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:01:44.324823"], ["updated_at", "2015-04-22 11:01:44.324823"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:01:44.326132"], ["log", "2015-04-22 14:01:44: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:01:44.326410"], ["updated_at", "2015-04-22 11:01:44.326410"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:01:44.327327"], ["log", "2015-04-22 14:01:44: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:01:44.327626"], ["updated_at", "2015-04-22 11:01:44.327626"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:01:44.334989"], ["log", "2015-04-22 14:01:44: ORIGINAL_STATUS\n2015-04-22 14:01:44: DELIVERED\n"], ["updated_at", "2015-04-22 11:01:44.335501"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:01:44.337163"], ["log", "2015-04-22 14:01:44: ORIGINAL_STATUS\n2015-04-22 14:01:44: DELIVERED\n"], ["updated_at", "2015-04-22 11:01:44.337470"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 6ms (Views: 0.4ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:01:44.345004"], ["updated_at", "2015-04-22 11:01:44.345004"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 11:01:44.347820"], ["updated_at", "2015-04-22 11:01:44.347820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:01:44.354049' AND '2015-04-22 10:51:44.354204')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:01:44.354049' AND '2015-04-22 10:51:44.354204') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:01:44.354049' AND '2015-04-22 10:51:44.354204')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:01:44.354049' AND '2015-04-22 10:51:44.354204') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:01:44.354049' AND '2015-04-22 10:51:44.354204')  (0.2ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:01:44.354049' AND '2015-04-22 10:51:44.354204') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (9.3ms) Completed 200 OK in 14ms (Views: 12.9ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 11:01:44.366217"], ["updated_at", "2015-04-22 11:01:44.366217"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:01:44.367398"], ["updated_at", "2015-04-22 11:01:44.367398"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 11:01:44.370408"], ["updated_at", "2015-04-22 11:01:44.370408"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 11:01:44.371322"], ["updated_at", "2015-04-22 11:01:44.371322"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:01:44.392882"], ["log", "2015-04-22 14:01:44: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:01:44.393254"], ["updated_at", "2015-04-22 11:01:44.393254"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:01:44.396306"], ["log", "2015-04-22 14:01:44: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:01:44.397005"], ["updated_at", "2015-04-22 11:01:44.397005"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:01:44.399286"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:01:44.401262"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_32208002"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:01:44.402396"], ["log", "2015-04-22 14:01:44: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:01:44.402717"], ["updated_at", "2015-04-22 11:01:44.402717"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:01:44.413090"], ["log", "2015-04-22 14:01:44: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:01:44.413557"], ["updated_at", "2015-04-22 11:01:44.413557"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (5.3ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:01:44.420830"], ["log", "2015-04-22 14:01:44: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:01:44.421214"], ["updated_at", "2015-04-22 11:01:44.421214"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:01:44.422138"], ["log", "2015-04-22 14:01:44: LOCAL_TEST\n2015-04-22 14:01:44: TEST_2\n"], ["updated_at", "2015-04-22 11:01:44.422420"], ["id", 1]]  (0.0ms) RELEASE 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" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.0ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.0ms) commit transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:04:25.356922"], ["log", "2015-04-22 14:04:25: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:04:25.357537"], ["updated_at", "2015-04-22 11:04:25.357537"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:04:25.360854"], ["log", "2015-04-22 14:04:25: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:04:25.361414"], ["updated_at", "2015-04-22 11:04:25.361414"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:04:25.363112"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:04:25.367907"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_41614925"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:04:25.369355"], ["log", "2015-04-22 14:04:25: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:04:25.369714"], ["updated_at", "2015-04-22 11:04:25.369714"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:04:25.380421"], ["log", "2015-04-22 14:04:25: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:04:25.380784"], ["updated_at", "2015-04-22 11:04:25.380784"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:04:25.382473"], ["log", "2015-04-22 14:04:25: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:04:25.382800"], ["updated_at", "2015-04-22 11:04:25.382800"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:04:25.383640"], ["log", "2015-04-22 14:04:25: LOCAL_TEST\n2015-04-22 14:04:25: TEST_2\n"], ["updated_at", "2015-04-22 11:04:25.383921"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:04:25.387478"], ["log", "2015-04-22 14:04:25: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:04:25.387874"], ["updated_at", "2015-04-22 11:04:25.387874"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:04:25.389438"], ["log", "2015-04-22 14:04:25: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:04:25.389780"], ["updated_at", "2015-04-22 11:04:25.389780"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:04:25.390775"], ["log", "2015-04-22 14:04:25: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:04:25.391185"], ["updated_at", "2015-04-22 11:04:25.391185"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:04:25.396244"], ["log", "2015-04-22 14:04:25: ORIGINAL_STATUS\n2015-04-22 14:04:25: DELIVERED\n"], ["updated_at", "2015-04-22 11:04:25.396803"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:04:25.398568"], ["log", "2015-04-22 14:04:25: ORIGINAL_STATUS\n2015-04-22 14:04:25: DELIVERED\n"], ["updated_at", "2015-04-22 11:04:25.399024"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 6ms (Views: 0.4ms | ActiveRecord: 0.6ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:04:25.408665"], ["updated_at", "2015-04-22 11:04:25.408665"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 11:04:25.410525"], ["updated_at", "2015-04-22 11:04:25.410525"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:04:25.416579' AND '2015-04-22 10:54:25.416718')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:04:25.416579' AND '2015-04-22 10:54:25.416718') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:04:25.416579' AND '2015-04-22 10:54:25.416718')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:04:25.416579' AND '2015-04-22 10:54:25.416718') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:04:25.416579' AND '2015-04-22 10:54:25.416718')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:04:25.416579' AND '2015-04-22 10:54:25.416718') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (8.8ms) Completed 200 OK in 11ms (Views: 10.6ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:04:25.425805"], ["updated_at", "2015-04-22 11:04:25.425805"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:04:25.427445"], ["updated_at", "2015-04-22 11:04:25.427445"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 11:04:25.431841"], ["updated_at", "2015-04-22 11:04:25.431841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:04:25.433407"], ["updated_at", "2015-04-22 11:04:25.433407"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_7337957"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:04:25.455013"], ["log", "2015-04-22 14:04:25: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:04:25.455775"], ["updated_at", "2015-04-22 11:04:25.455775"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_81024027"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:04:25.463729"], ["log", "2015-04-22 14:04:25: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:04:25.464105"], ["updated_at", "2015-04-22 11:04:25.464105"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.0ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (0.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_62881030"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:04:35.772340"], ["log", "2015-04-22 14:04:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:04:35.773003"], ["updated_at", "2015-04-22 11:04:35.773003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_36408096"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:04:35.774427"], ["log", "2015-04-22 14:04:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:04:35.774776"], ["updated_at", "2015-04-22 11:04:35.774776"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:04:35.779295"], ["log", "2015-04-22 14:04:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:04:35.779731"], ["updated_at", "2015-04-22 11:04:35.779731"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:04:35.781750"], ["log", "2015-04-22 14:04:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:04:35.782133"], ["updated_at", "2015-04-22 11:04:35.782133"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:04:35.783251"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:04:35.787619"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_17414608"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:04:35.789175"], ["log", "2015-04-22 14:04:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:04:35.789561"], ["updated_at", "2015-04-22 11:04:35.789561"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:04:35.799738"], ["log", "2015-04-22 14:04:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:04:35.800141"], ["updated_at", "2015-04-22 11:04:35.800141"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:04:35.801902"], ["log", "2015-04-22 14:04:35: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:04:35.802237"], ["updated_at", "2015-04-22 11:04:35.802237"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:04:35.803120"], ["log", "2015-04-22 14:04:35: LOCAL_TEST\n2015-04-22 14:04:35: TEST_2\n"], ["updated_at", "2015-04-22 11:04:35.803424"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:04:35.812095"], ["log", "2015-04-22 14:04:35: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:04:35.812538"], ["updated_at", "2015-04-22 11:04:35.812538"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:04:35.814126"], ["log", "2015-04-22 14:04:35: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:04:35.814452"], ["updated_at", "2015-04-22 11:04:35.814452"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:04:35.815356"], ["log", "2015-04-22 14:04:35: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:04:35.815668"], ["updated_at", "2015-04-22 11:04:35.815668"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:04:35.819757"], ["log", "2015-04-22 14:04:35: ORIGINAL_STATUS\n2015-04-22 14:04:35: DELIVERED\n"], ["updated_at", "2015-04-22 11:04:35.820214"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:04:35.821586"], ["log", "2015-04-22 14:04:35: ORIGINAL_STATUS\n2015-04-22 14:04:35: DELIVERED\n"], ["updated_at", "2015-04-22 11:04:35.822077"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 11:04:35.831015"], ["updated_at", "2015-04-22 11:04:35.831015"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 11:04:35.832252"], ["updated_at", "2015-04-22 11:04:35.832252"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:04:35.836942' AND '2015-04-22 10:54:35.837117')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:04:35.836942' AND '2015-04-22 10:54:35.837117') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:04:35.836942' AND '2015-04-22 10:54:35.837117')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:04:35.836942' AND '2015-04-22 10:54:35.837117') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:04:35.836942' AND '2015-04-22 10:54:35.837117')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:04:35.836942' AND '2015-04-22 10:54:35.837117') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (9.1ms) Completed 200 OK in 11ms (Views: 10.8ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 11:04:35.847142"], ["updated_at", "2015-04-22 11:04:35.847142"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:04:35.848462"], ["updated_at", "2015-04-22 11:04:35.848462"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:04:35.852567"], ["updated_at", "2015-04-22 11:04:35.852567"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 11:04:35.854177"], ["updated_at", "2015-04-22 11:04:35.854177"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.1ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.0ms) SELECT version FROM "schema_migrations"  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120102215215')  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.0ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.0ms) SELECT version FROM "schema_migrations"  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20120102215215')  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar(255), "status" varchar(255), "status_updated_at" datetime, "sms_type" varchar(255), "log" text, "to" varchar(255), "from" varchar(255), "body" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.1ms) select sqlite_version(*)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.0ms) SELECT version FROM "schema_migrations"  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120102215215')  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id")  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.0ms) SELECT version FROM "schema_migrations"  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120102215215')  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id")  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.0ms) SELECT version FROM "schema_migrations"  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120102215215')  (0.7ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)  (0.2ms) select sqlite_version(*)  (0.4ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id")  (0.4ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)   (0.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.2ms) SELECT version FROM "schema_migrations"  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120102215215')  (0.3ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id")  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.0ms) SELECT version FROM "schema_migrations"  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120102215215')  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)   (0.0ms) select sqlite_version(*)  (0.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ArgumentError: prepare called on a closed database: SELECT name FROM sqlite_master WHERE (type = 'table' OR type = 'view') AND NOT name = 'sqlite_sequence' AND name = "action_smser_delivery_reports"  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id")  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.0ms) SELECT version FROM "schema_migrations"  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120102215215') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:24:25.977560"], ["log", "2015-04-22 14:24:25: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:24:25.978061"], ["updated_at", "2015-04-22 11:24:25.978061"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:24:25.980544"], ["log", "2015-04-22 14:24:25: LOCAL_TEST\n2015-04-22 14:24:25: TEST_2\n"], ["updated_at", "2015-04-22 11:24:25.980898"], ["id", 33]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:24:25.997323"], ["log", "2015-04-22 14:24:25: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:24:25.997730"], ["updated_at", "2015-04-22 11:24:25.997730"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:24:25.999537"], ["log", "2015-04-22 14:24:25: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:24:25.999867"], ["updated_at", "2015-04-22 11:24:25.999867"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:24:26.001055"], ["log", "2015-04-22 14:24:26: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:24:26.001487"], ["updated_at", "2015-04-22 11:24:26.001487"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:24:26.007418"], ["log", "2015-04-22 14:24:25: ORIGINAL_STATUS\n2015-04-22 14:24:26: DELIVERED\n"], ["updated_at", "2015-04-22 11:24:26.007936"], ["id", 33]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:24:26.009515"], ["log", "2015-04-22 14:24:26: ORIGINAL_STATUS\n2015-04-22 14:24:26: DELIVERED\n"], ["updated_at", "2015-04-22 11:24:26.009898"], ["id", 34]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 33]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 34]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 11:24:26.018980"], ["updated_at", "2015-04-22 11:24:26.018980"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:24:26.020240"], ["updated_at", "2015-04-22 11:24:26.020240"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:24:26.024337' AND '2015-04-22 11:14:26.024443')  (0.3ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:24:26.024337' AND '2015-04-22 11:14:26.024443') GROUP BY gateway SQLite3::SQLException: no such column: gateway: SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:24:26.024337' AND '2015-04-22 11:14:26.024443') GROUP BY gateway Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.9ms) Completed 500 Internal Server Error in 9ms (ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 11:24:26.032351"], ["updated_at", "2015-04-22 11:24:26.032351"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 11:24:26.033619"], ["updated_at", "2015-04-22 11:24:26.033619"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 11:24:26.038309"], ["updated_at", "2015-04-22 11:24:26.038309"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 11:24:26.039520"], ["updated_at", "2015-04-22 11:24:26.039520"]]  (0.0ms) RELEASE 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" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:28:10.154126"], ["log", "2015-04-22 14:28:10: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:28:10.154640"], ["updated_at", "2015-04-22 11:28:10.154640"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:28:10.157666"], ["log", "2015-04-22 14:28:10: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:28:10.157977"], ["updated_at", "2015-04-22 11:28:10.157977"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:28:10.158935"], ["log", "2015-04-22 14:28:10: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:28:10.159354"], ["updated_at", "2015-04-22 11:28:10.159354"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:28:10.165063"], ["log", "2015-04-22 14:28:10: ORIGINAL_STATUS\n2015-04-22 14:28:10: DELIVERED\n"], ["updated_at", "2015-04-22 11:28:10.165591"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:28:10.167428"], ["log", "2015-04-22 14:28:10: ORIGINAL_STATUS\n2015-04-22 14:28:10: DELIVERED\n"], ["updated_at", "2015-04-22 11:28:10.167718"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:28:10.174741"], ["updated_at", "2015-04-22 11:28:10.174741"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 11:28:10.176426"], ["updated_at", "2015-04-22 11:28:10.176426"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:28:10.180896' AND '2015-04-22 11:18:10.181045')  (0.2ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:28:10.180896' AND '2015-04-22 11:18:10.181045') GROUP BY gateway SQLite3::SQLException: no such column: gateway: SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:28:10.180896' AND '2015-04-22 11:18:10.181045') GROUP BY gateway Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (6.5ms) Completed 500 Internal Server Error in 8ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:28:10.187361"], ["updated_at", "2015-04-22 11:28:10.187361"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:28:10.188538"], ["updated_at", "2015-04-22 11:28:10.188538"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 11:28:10.191872"], ["updated_at", "2015-04-22 11:28:10.191872"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:28:10.192970"], ["updated_at", "2015-04-22 11:28:10.192970"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:28:10.205069"], ["log", "2015-04-22 14:28:10: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:28:10.205408"], ["updated_at", "2015-04-22 11:28:10.205408"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:28:10.206257"], ["log", "2015-04-22 14:28:10: LOCAL_TEST\n2015-04-22 14:28:10: TEST_2\n"], ["updated_at", "2015-04-22 11:28:10.206499"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:29:59.465414"], ["log", "2015-04-22 14:29:59: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:29:59.465920"], ["updated_at", "2015-04-22 11:29:59.465920"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:29:59.472238"], ["log", "2015-04-22 14:29:59: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:29:59.472719"], ["updated_at", "2015-04-22 11:29:59.472719"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:29:59.473880"], ["log", "2015-04-22 14:29:59: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:29:59.474330"], ["updated_at", "2015-04-22 11:29:59.474330"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:29:59.480293"], ["log", "2015-04-22 14:29:59: ORIGINAL_STATUS\n2015-04-22 14:29:59: DELIVERED\n"], ["updated_at", "2015-04-22 11:29:59.480847"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:29:59.483001"], ["log", "2015-04-22 14:29:59: ORIGINAL_STATUS\n2015-04-22 14:29:59: DELIVERED\n"], ["updated_at", "2015-04-22 11:29:59.483370"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 0.6ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:29:59.490850"], ["updated_at", "2015-04-22 11:29:59.490850"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:29:59.492490"], ["updated_at", "2015-04-22 11:29:59.492490"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:29:59.496948' AND '2015-04-22 11:19:59.497072')  (0.2ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:29:59.496948' AND '2015-04-22 11:19:59.497072') GROUP BY gateway SQLite3::SQLException: no such column: gateway: SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:29:59.496948' AND '2015-04-22 11:19:59.497072') GROUP BY gateway Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.0ms) Completed 500 Internal Server Error in 8ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 11:29:59.503696"], ["updated_at", "2015-04-22 11:29:59.503696"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:29:59.504776"], ["updated_at", "2015-04-22 11:29:59.504776"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:29:59.508349"], ["updated_at", "2015-04-22 11:29:59.508349"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:29:59.509432"], ["updated_at", "2015-04-22 11:29:59.509432"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:30:45.662250"], ["log", "2015-04-22 14:30:45: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:30:45.662841"], ["updated_at", "2015-04-22 11:30:45.662841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:30:45.666416"], ["log", "2015-04-22 14:30:45: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:30:45.666797"], ["updated_at", "2015-04-22 11:30:45.666797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:30:45.667792"], ["log", "2015-04-22 14:30:45: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:30:45.668068"], ["updated_at", "2015-04-22 11:30:45.668068"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.3ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:30:45.673458"], ["log", "2015-04-22 14:30:45: ORIGINAL_STATUS\n2015-04-22 14:30:45: DELIVERED\n"], ["updated_at", "2015-04-22 11:30:45.674219"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:30:45.677238"], ["log", "2015-04-22 14:30:45: ORIGINAL_STATUS\n2015-04-22 14:30:45: DELIVERED\n"], ["updated_at", "2015-04-22 11:30:45.677705"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 8ms (Views: 0.5ms | ActiveRecord: 0.7ms) ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.2ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:30:45.686690"], ["updated_at", "2015-04-22 11:30:45.686690"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:30:45.688209"], ["updated_at", "2015-04-22 11:30:45.688209"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:30:45.693824' AND '2015-04-22 11:20:45.693971')  (0.2ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:30:45.693824' AND '2015-04-22 11:20:45.693971') GROUP BY gateway SQLite3::SQLException: no such column: gateway: SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:30:45.693824' AND '2015-04-22 11:20:45.693971') GROUP BY gateway Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (8.8ms) Completed 500 Internal Server Error in 10ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:30:45.702146"], ["updated_at", "2015-04-22 11:30:45.702146"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:30:45.703383"], ["updated_at", "2015-04-22 11:30:45.703383"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:30:45.707365"], ["updated_at", "2015-04-22 11:30:45.707365"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 11:30:45.708678"], ["updated_at", "2015-04-22 11:30:45.708678"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:30:45.715428"], ["log", "2015-04-22 14:30:45: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:30:45.715798"], ["updated_at", "2015-04-22 11:30:45.715798"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:30:45.716711"], ["log", "2015-04-22 14:30:45: LOCAL_TEST\n2015-04-22 14:30:45: TEST_2\n"], ["updated_at", "2015-04-22 11:30:45.717022"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:32:02.208476"], ["log", "2015-04-22 14:32:02: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:32:02.208976"], ["updated_at", "2015-04-22 11:32:02.208976"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:32:02.211969"], ["log", "2015-04-22 14:32:02: LOCAL_TEST\n2015-04-22 14:32:02: TEST_2\n"], ["updated_at", "2015-04-22 11:32:02.212336"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:32:02.226287"], ["log", "2015-04-22 14:32:02: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:32:02.226727"], ["updated_at", "2015-04-22 11:32:02.226727"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:32:02.228652"], ["log", "2015-04-22 14:32:02: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:32:02.228946"], ["updated_at", "2015-04-22 11:32:02.228946"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:32:02.229830"], ["log", "2015-04-22 14:32:02: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:32:02.230087"], ["updated_at", "2015-04-22 11:32:02.230087"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:32:02.235328"], ["log", "2015-04-22 14:32:02: ORIGINAL_STATUS\n2015-04-22 14:32:02: DELIVERED\n"], ["updated_at", "2015-04-22 11:32:02.235825"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:32:02.237169"], ["log", "2015-04-22 14:32:02: ORIGINAL_STATUS\n2015-04-22 14:32:02: DELIVERED\n"], ["updated_at", "2015-04-22 11:32:02.237664"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 11:32:02.245870"], ["updated_at", "2015-04-22 11:32:02.245870"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:32:02.246953"], ["updated_at", "2015-04-22 11:32:02.246953"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:32:02.251106' AND '2015-04-22 11:22:02.251263')  (0.2ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:32:02.251106' AND '2015-04-22 11:22:02.251263') GROUP BY gateway SQLite3::SQLException: no such column: gateway: SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:32:02.251106' AND '2015-04-22 11:22:02.251263') GROUP BY gateway Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (6.7ms) Completed 500 Internal Server Error in 8ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:32:02.257478"], ["updated_at", "2015-04-22 11:32:02.257478"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:32:02.259097"], ["updated_at", "2015-04-22 11:32:02.259097"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 11:32:02.263164"], ["updated_at", "2015-04-22 11:32:02.263164"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:32:02.264242"], ["updated_at", "2015-04-22 11:32:02.264242"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:32:09.039245"], ["log", "2015-04-22 14:32:09: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:32:09.039881"], ["updated_at", "2015-04-22 11:32:09.039881"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:32:09.042701"], ["log", "2015-04-22 14:32:09: LOCAL_TEST\n2015-04-22 14:32:09: TEST_2\n"], ["updated_at", "2015-04-22 11:32:09.043146"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:32:09.060961"], ["log", "2015-04-22 14:32:09: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:32:09.061350"], ["updated_at", "2015-04-22 11:32:09.061350"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:32:09.062989"], ["log", "2015-04-22 14:32:09: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:32:09.063366"], ["updated_at", "2015-04-22 11:32:09.063366"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:32:09.064278"], ["log", "2015-04-22 14:32:09: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:32:09.064569"], ["updated_at", "2015-04-22 11:32:09.064569"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:32:09.069589"], ["log", "2015-04-22 14:32:09: ORIGINAL_STATUS\n2015-04-22 14:32:09: DELIVERED\n"], ["updated_at", "2015-04-22 11:32:09.070177"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:32:09.071857"], ["log", "2015-04-22 14:32:09: ORIGINAL_STATUS\n2015-04-22 14:32:09: DELIVERED\n"], ["updated_at", "2015-04-22 11:32:09.072298"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:32:09.079604"], ["updated_at", "2015-04-22 11:32:09.079604"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:32:09.080596"], ["updated_at", "2015-04-22 11:32:09.080596"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:32:09.085119' AND '2015-04-22 11:22:09.085266')  (0.2ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:32:09.085119' AND '2015-04-22 11:22:09.085266') GROUP BY gateway SQLite3::SQLException: no such column: gateway: SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:32:09.085119' AND '2015-04-22 11:22:09.085266') GROUP BY gateway Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.8ms) Completed 500 Internal Server Error in 9ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:32:09.092505"], ["updated_at", "2015-04-22 11:32:09.092505"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:32:09.093647"], ["updated_at", "2015-04-22 11:32:09.093647"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:32:09.097058"], ["updated_at", "2015-04-22 11:32:09.097058"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 11:32:09.098050"], ["updated_at", "2015-04-22 11:32:09.098050"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:32:45.789691"], ["log", "2015-04-22 14:32:45: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:32:45.790252"], ["updated_at", "2015-04-22 11:32:45.790252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:32:45.793008"], ["log", "2015-04-22 14:32:45: LOCAL_TEST\n2015-04-22 14:32:45: TEST_2\n"], ["updated_at", "2015-04-22 11:32:45.793403"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:32:45.797779"], ["log", "2015-04-22 14:32:45: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:32:45.798155"], ["updated_at", "2015-04-22 11:32:45.798155"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:32:45.799668"], ["log", "2015-04-22 14:32:45: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:32:45.799985"], ["updated_at", "2015-04-22 11:32:45.799985"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:32:45.801048"], ["log", "2015-04-22 14:32:45: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:32:45.801474"], ["updated_at", "2015-04-22 11:32:45.801474"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:32:45.807143"], ["log", "2015-04-22 14:32:45: ORIGINAL_STATUS\n2015-04-22 14:32:45: DELIVERED\n"], ["updated_at", "2015-04-22 11:32:45.807792"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:32:45.809337"], ["log", "2015-04-22 14:32:45: ORIGINAL_STATUS\n2015-04-22 14:32:45: DELIVERED\n"], ["updated_at", "2015-04-22 11:32:45.809782"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 11:32:45.818682"], ["updated_at", "2015-04-22 11:32:45.818682"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:32:45.820117"], ["updated_at", "2015-04-22 11:32:45.820117"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:32:45.824842' AND '2015-04-22 11:22:45.824961')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:32:45.824842' AND '2015-04-22 11:22:45.824961') GROUP BY gateway SQLite3::SQLException: no such column: gateway: SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:32:45.824842' AND '2015-04-22 11:22:45.824961') GROUP BY gateway Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.3ms) Completed 500 Internal Server Error in 9ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:32:45.831845"], ["updated_at", "2015-04-22 11:32:45.831845"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 11:32:45.832964"], ["updated_at", "2015-04-22 11:32:45.832964"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:32:45.837680"], ["updated_at", "2015-04-22 11:32:45.837680"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 11:32:45.838939"], ["updated_at", "2015-04-22 11:32:45.838939"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (46.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)   (0.2ms) select sqlite_version(*)  (43.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.2ms) begin transaction  (0.7ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)  (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (33.7ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_action_smser_delivery_reports_on_msg_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_action_smser_delivery_reports_on_msg_id' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:33:17.915684"], ["log", "2015-04-22 14:33:17: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:33:17.916137"], ["updated_at", "2015-04-22 11:33:17.916137"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:33:17.920744"], ["log", "2015-04-22 14:33:17: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:33:17.921167"], ["updated_at", "2015-04-22 11:33:17.921167"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:33:17.922521"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:33:17.926652"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_69710434"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:33:17.927844"], ["log", "2015-04-22 14:33:17: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:33:17.928148"], ["updated_at", "2015-04-22 11:33:17.928148"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:33:17.938514"], ["log", "2015-04-22 14:33:17: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:33:17.938904"], ["updated_at", "2015-04-22 11:33:17.938904"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:33:17.941331"], ["log", "2015-04-22 14:33:17: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:33:17.941723"], ["updated_at", "2015-04-22 11:33:17.941723"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:33:17.942690"], ["log", "2015-04-22 14:33:17: LOCAL_TEST\n2015-04-22 14:33:17: TEST_2\n"], ["updated_at", "2015-04-22 11:33:17.942996"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:33:17.956264"], ["log", "2015-04-22 14:33:17: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:33:17.956685"], ["updated_at", "2015-04-22 11:33:17.956685"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:33:17.958245"], ["log", "2015-04-22 14:33:17: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:33:17.958516"], ["updated_at", "2015-04-22 11:33:17.958516"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:33:17.959358"], ["log", "2015-04-22 14:33:17: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:33:17.959601"], ["updated_at", "2015-04-22 11:33:17.959601"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:33:17.963337"], ["log", "2015-04-22 14:33:17: ORIGINAL_STATUS\n2015-04-22 14:33:17: DELIVERED\n"], ["updated_at", "2015-04-22 11:33:17.963791"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:33:17.965186"], ["log", "2015-04-22 14:33:17: ORIGINAL_STATUS\n2015-04-22 14:33:17: DELIVERED\n"], ["updated_at", "2015-04-22 11:33:17.965537"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.2ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:33:17.974723"], ["updated_at", "2015-04-22 11:33:17.974723"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 11:33:17.976071"], ["updated_at", "2015-04-22 11:33:17.976071"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:33:17.980951' AND '2015-04-22 11:23:17.981093')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:33:17.980951' AND '2015-04-22 11:23:17.981093') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:33:17.980951' AND '2015-04-22 11:23:17.981093')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:33:17.980951' AND '2015-04-22 11:23:17.981093') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:33:17.980951' AND '2015-04-22 11:23:17.981093')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:33:17.980951' AND '2015-04-22 11:23:17.981093') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (8.3ms) Completed 200 OK in 10ms (Views: 9.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:33:17.989597"], ["updated_at", "2015-04-22 11:33:17.989597"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:33:17.990864"], ["updated_at", "2015-04-22 11:33:17.990864"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:33:17.994357"], ["updated_at", "2015-04-22 11:33:17.994357"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 11:33:17.995623"], ["updated_at", "2015-04-22 11:33:17.995623"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_37533440"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:33:18.002074"], ["log", "2015-04-22 14:33:18: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:33:18.002515"], ["updated_at", "2015-04-22 11:33:18.002515"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_922570"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:33:18.003906"], ["log", "2015-04-22 14:33:18: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:33:18.004274"], ["updated_at", "2015-04-22 11:33:18.004274"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:33:25.094472"], ["log", "2015-04-22 14:33:25: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:33:25.094856"], ["updated_at", "2015-04-22 11:33:25.094856"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:33:25.098434"], ["log", "2015-04-22 14:33:25: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:33:25.098848"], ["updated_at", "2015-04-22 11:33:25.098848"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:33:25.100081"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:33:25.104456"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_33103147"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:33:25.105791"], ["log", "2015-04-22 14:33:25: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:33:25.106076"], ["updated_at", "2015-04-22 11:33:25.106076"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.3ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:33:25.115784"], ["log", "2015-04-22 14:33:25: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:33:25.116184"], ["updated_at", "2015-04-22 11:33:25.116184"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:33:25.118104"], ["log", "2015-04-22 14:33:25: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:33:25.118472"], ["updated_at", "2015-04-22 11:33:25.118472"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:33:25.119375"], ["log", "2015-04-22 14:33:25: LOCAL_TEST\n2015-04-22 14:33:25: TEST_2\n"], ["updated_at", "2015-04-22 11:33:25.119642"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:33:25.124562"], ["log", "2015-04-22 14:33:25: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:33:25.124954"], ["updated_at", "2015-04-22 11:33:25.124954"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:33:25.126621"], ["log", "2015-04-22 14:33:25: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:33:25.126937"], ["updated_at", "2015-04-22 11:33:25.126937"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:33:25.127846"], ["log", "2015-04-22 14:33:25: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:33:25.128120"], ["updated_at", "2015-04-22 11:33:25.128120"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:33:25.132309"], ["log", "2015-04-22 14:33:25: ORIGINAL_STATUS\n2015-04-22 14:33:25: DELIVERED\n"], ["updated_at", "2015-04-22 11:33:25.132733"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:33:25.133903"], ["log", "2015-04-22 14:33:25: ORIGINAL_STATUS\n2015-04-22 14:33:25: DELIVERED\n"], ["updated_at", "2015-04-22 11:33:25.134200"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:33:25.141400"], ["updated_at", "2015-04-22 11:33:25.141400"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:33:25.142462"], ["updated_at", "2015-04-22 11:33:25.142462"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:33:25.146870' AND '2015-04-22 11:23:25.147050')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:33:25.146870' AND '2015-04-22 11:23:25.147050') GROUP BY "action_smser_delivery_reports"."gateway"  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:33:25.146870' AND '2015-04-22 11:23:25.147050')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:33:25.146870' AND '2015-04-22 11:23:25.147050') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:33:25.146870' AND '2015-04-22 11:23:25.147050')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:33:25.146870' AND '2015-04-22 11:23:25.147050') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.8ms) Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:33:25.154701"], ["updated_at", "2015-04-22 11:33:25.154701"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:33:25.155939"], ["updated_at", "2015-04-22 11:33:25.155939"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 11:33:25.159368"], ["updated_at", "2015-04-22 11:33:25.159368"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 11:33:25.160411"], ["updated_at", "2015-04-22 11:33:25.160411"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_93007136"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:33:25.166552"], ["log", "2015-04-22 14:33:25: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:33:25.166948"], ["updated_at", "2015-04-22 11:33:25.166948"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_47818927"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:33:25.168258"], ["log", "2015-04-22 14:33:25: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:33:25.168562"], ["updated_at", "2015-04-22 11:33:25.168562"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:34:02.425242"], ["log", "2015-04-22 14:34:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:34:02.425642"], ["updated_at", "2015-04-22 11:34:02.425642"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:34:02.429383"], ["log", "2015-04-22 14:34:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:34:02.429871"], ["updated_at", "2015-04-22 11:34:02.429871"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:34:02.431185"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:34:02.434946"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_41177156"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:34:02.436252"], ["log", "2015-04-22 14:34:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:34:02.436563"], ["updated_at", "2015-04-22 11:34:02.436563"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.3ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:34:02.447447"], ["log", "2015-04-22 14:34:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:34:02.448046"], ["updated_at", "2015-04-22 11:34:02.448046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:34:02.451763"], ["log", "2015-04-22 14:34:02: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:34:02.452770"], ["updated_at", "2015-04-22 11:34:02.452770"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:34:02.454594"], ["log", "2015-04-22 14:34:02: LOCAL_TEST\n2015-04-22 14:34:02: TEST_2\n"], ["updated_at", "2015-04-22 11:34:02.455118"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:14.723939"], ["log", "2015-04-22 14:35:14: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:35:14.724395"], ["updated_at", "2015-04-22 11:35:14.724395"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:14.725725"], ["log", "2015-04-22 14:35:14: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:35:14.726026"], ["updated_at", "2015-04-22 11:35:14.726026"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_70192327"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:14.729797"], ["log", "2015-04-22 14:35:14: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:14.730117"], ["updated_at", "2015-04-22 11:35:14.730117"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_84144259"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:14.731065"], ["log", "2015-04-22 14:35:14: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:14.731350"], ["updated_at", "2015-04-22 11:35:14.731350"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:14.737038"], ["log", "2015-04-22 14:35:14: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:35:14.737480"], ["updated_at", "2015-04-22 11:35:14.737480"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:14.738932"], ["log", "2015-04-22 14:35:14: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:35:14.739418"], ["updated_at", "2015-04-22 11:35:14.739418"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:14.743522"], ["log", "2015-04-22 14:35:14: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:35:14.743842"], ["updated_at", "2015-04-22 11:35:14.743842"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:14.745156"], ["log", "2015-04-22 14:35:14: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:35:14.745428"], ["updated_at", "2015-04-22 11:35:14.745428"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:35:14.748021"], ["log", "2015-04-22 14:35:14: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:35:14.748341"], ["updated_at", "2015-04-22 11:35:14.748341"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:35:14.753583"], ["log", "2015-04-22 14:35:14: ORIGINAL_STATUS\n2015-04-22 14:35:14: DELIVERED\n"], ["updated_at", "2015-04-22 11:35:14.754121"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:35:14.757789"], ["log", "2015-04-22 14:35:14: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:35:14.758142"], ["updated_at", "2015-04-22 11:35:14.758142"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:35:14.759121"], ["log", "2015-04-22 14:35:14: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:35:14.759428"], ["updated_at", "2015-04-22 11:35:14.759428"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:35:14.761948"], ["log", "2015-04-22 14:35:14: ORIGINAL_STATUS\n2015-04-22 14:35:14: DELIVERED\n"], ["updated_at", "2015-04-22 11:35:14.762326"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:35:14.763594"], ["log", "2015-04-22 14:35:14: ORIGINAL_STATUS\n2015-04-22 14:35:14: DELIVERED\n"], ["updated_at", "2015-04-22 11:35:14.763906"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:35:14.771953"], ["updated_at", "2015-04-22 11:35:14.771953"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 11:35:14.773913"], ["updated_at", "2015-04-22 11:35:14.773913"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:14.778763' AND '2015-04-22 11:25:14.778895')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:14.778763' AND '2015-04-22 11:25:14.778895') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:14.778763' AND '2015-04-22 11:25:14.778895')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:14.778763' AND '2015-04-22 11:25:14.778895') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:14.778763' AND '2015-04-22 11:25:14.778895')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:14.778763' AND '2015-04-22 11:25:14.778895') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.7ms) Completed 200 OK in 10ms (Views: 9.2ms | ActiveRecord: 0.5ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:35:14.787646"], ["updated_at", "2015-04-22 11:35:14.787646"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 11:35:14.789014"], ["updated_at", "2015-04-22 11:35:14.789014"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:14.791933' AND '2015-04-22 11:25:14.792011')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:14.791933' AND '2015-04-22 11:25:14.792011') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:14.791933' AND '2015-04-22 11:25:14.792011')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:14.791933' AND '2015-04-22 11:25:14.792011') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:14.791933' AND '2015-04-22 11:25:14.792011')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:14.791933' AND '2015-04-22 11:25:14.792011') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.8ms) Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 11:35:14.800865"], ["updated_at", "2015-04-22 11:35:14.800865"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:35:14.802202"], ["updated_at", "2015-04-22 11:35:14.802202"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (2.8ms) Completed 200 OK in 4ms (Views: 3.8ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:23.209048"], ["log", "2015-04-22 14:35:23: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:23.209685"], ["updated_at", "2015-04-22 11:35:23.209685"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:23.214224"], ["log", "2015-04-22 14:35:23: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:23.214597"], ["updated_at", "2015-04-22 11:35:23.214597"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:35:23.215924"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:35:23.219354"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_99306135"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:23.220571"], ["log", "2015-04-22 14:35:23: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:23.220868"], ["updated_at", "2015-04-22 11:35:23.220868"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:23.231121"], ["log", "2015-04-22 14:35:23: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:23.231534"], ["updated_at", "2015-04-22 11:35:23.231534"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:35:23.233514"], ["log", "2015-04-22 14:35:23: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:35:23.233886"], ["updated_at", "2015-04-22 11:35:23.233886"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:35:23.234787"], ["log", "2015-04-22 14:35:23: LOCAL_TEST\n2015-04-22 14:35:23: TEST_2\n"], ["updated_at", "2015-04-22 11:35:23.235050"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_63701650"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:23.238756"], ["log", "2015-04-22 14:35:23: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:23.239100"], ["updated_at", "2015-04-22 11:35:23.239100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_78894923"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:23.240319"], ["log", "2015-04-22 14:35:23: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:23.240628"], ["updated_at", "2015-04-22 11:35:23.240628"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:23.255121"], ["log", "2015-04-22 14:35:23: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:35:23.255596"], ["updated_at", "2015-04-22 11:35:23.255596"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:23.256733"], ["log", "2015-04-22 14:35:23: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:35:23.257029"], ["updated_at", "2015-04-22 11:35:23.257029"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:23.267608"], ["log", "2015-04-22 14:35:23: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:35:23.268024"], ["updated_at", "2015-04-22 11:35:23.268024"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:23.269237"], ["log", "2015-04-22 14:35:23: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:35:23.269519"], ["updated_at", "2015-04-22 11:35:23.269519"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:23.275758"], ["log", "2015-04-22 14:35:23: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:35:23.276218"], ["updated_at", "2015-04-22 11:35:23.276218"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:23.277721"], ["log", "2015-04-22 14:35:23: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:35:23.278073"], ["updated_at", "2015-04-22 11:35:23.278073"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:35:23.281149"], ["log", "2015-04-22 14:35:23: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:35:23.281532"], ["updated_at", "2015-04-22 11:35:23.281532"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:35:23.286016"], ["log", "2015-04-22 14:35:23: ORIGINAL_STATUS\n2015-04-22 14:35:23: DELIVERED\n"], ["updated_at", "2015-04-22 11:35:23.286466"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:35:23.289424"], ["log", "2015-04-22 14:35:23: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:35:23.290019"], ["updated_at", "2015-04-22 11:35:23.290019"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:35:23.291596"], ["log", "2015-04-22 14:35:23: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:35:23.291984"], ["updated_at", "2015-04-22 11:35:23.291984"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:35:23.295717"], ["log", "2015-04-22 14:35:23: ORIGINAL_STATUS\n2015-04-22 14:35:23: DELIVERED\n"], ["updated_at", "2015-04-22 11:35:23.296249"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:35:23.297752"], ["log", "2015-04-22 14:35:23: ORIGINAL_STATUS\n2015-04-22 14:35:23: DELIVERED\n"], ["updated_at", "2015-04-22 11:35:23.298121"], ["id", 2]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 11:35:23.307361"], ["updated_at", "2015-04-22 11:35:23.307361"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 11:35:23.308810"], ["updated_at", "2015-04-22 11:35:23.308810"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:23.314442' AND '2015-04-22 11:25:23.314580')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:23.314442' AND '2015-04-22 11:25:23.314580') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:23.314442' AND '2015-04-22 11:25:23.314580')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:23.314442' AND '2015-04-22 11:25:23.314580') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:23.314442' AND '2015-04-22 11:25:23.314580')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:23.314442' AND '2015-04-22 11:25:23.314580') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.9ms) Completed 200 OK in 10ms (Views: 9.7ms | ActiveRecord: 0.5ms)  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 11:35:23.323327"], ["updated_at", "2015-04-22 11:35:23.323327"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:35:23.324729"], ["updated_at", "2015-04-22 11:35:23.324729"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:23.328207' AND '2015-04-22 11:25:23.328299')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:23.328207' AND '2015-04-22 11:25:23.328299') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:23.328207' AND '2015-04-22 11:25:23.328299')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:23.328207' AND '2015-04-22 11:25:23.328299') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:23.328207' AND '2015-04-22 11:25:23.328299')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:23.328207' AND '2015-04-22 11:25:23.328299') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (5.8ms) Completed 200 OK in 7ms (Views: 5.9ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 11:35:23.338340"], ["updated_at", "2015-04-22 11:35:23.338340"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:35:23.339588"], ["updated_at", "2015-04-22 11:35:23.339588"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (3.7ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_87179327"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:31.661151"], ["log", "2015-04-22 14:35:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:31.661661"], ["updated_at", "2015-04-22 11:35:31.661661"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_592717"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:31.664556"], ["log", "2015-04-22 14:35:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:31.665152"], ["updated_at", "2015-04-22 11:35:31.665152"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:35:31.668537"], ["log", "2015-04-22 14:35:31: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:35:31.668958"], ["updated_at", "2015-04-22 11:35:31.668958"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:35:31.674015"], ["log", "2015-04-22 14:35:31: ORIGINAL_STATUS\n2015-04-22 14:35:31: DELIVERED\n"], ["updated_at", "2015-04-22 11:35:31.674499"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.4ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:35:31.677914"], ["log", "2015-04-22 14:35:31: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:35:31.678272"], ["updated_at", "2015-04-22 11:35:31.678272"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:35:31.679427"], ["log", "2015-04-22 14:35:31: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:35:31.679862"], ["updated_at", "2015-04-22 11:35:31.679862"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:35:31.683262"], ["log", "2015-04-22 14:35:31: ORIGINAL_STATUS\n2015-04-22 14:35:31: DELIVERED\n"], ["updated_at", "2015-04-22 11:35:31.683882"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:35:31.685329"], ["log", "2015-04-22 14:35:31: ORIGINAL_STATUS\n2015-04-22 14:35:31: DELIVERED\n"], ["updated_at", "2015-04-22 11:35:31.685696"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 11:35:31.693877"], ["updated_at", "2015-04-22 11:35:31.693877"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:35:31.695286"], ["updated_at", "2015-04-22 11:35:31.695286"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:31.700410' AND '2015-04-22 11:25:31.700583')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:31.700410' AND '2015-04-22 11:25:31.700583') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:31.700410' AND '2015-04-22 11:25:31.700583')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:31.700410' AND '2015-04-22 11:25:31.700583') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:31.700410' AND '2015-04-22 11:25:31.700583')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:31.700410' AND '2015-04-22 11:25:31.700583') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (9.5ms) Completed 200 OK in 12ms (Views: 10.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:35:31.709817"], ["updated_at", "2015-04-22 11:35:31.709817"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:35:31.710977"], ["updated_at", "2015-04-22 11:35:31.710977"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:31.714362' AND '2015-04-22 11:25:31.714480')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:31.714362' AND '2015-04-22 11:25:31.714480') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:31.714362' AND '2015-04-22 11:25:31.714480')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:31.714362' AND '2015-04-22 11:25:31.714480') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:31.714362' AND '2015-04-22 11:25:31.714480')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:31.714362' AND '2015-04-22 11:25:31.714480') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (11.4ms) Completed 200 OK in 12ms (Views: 11.6ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:35:31.729983"], ["updated_at", "2015-04-22 11:35:31.729983"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:35:31.731124"], ["updated_at", "2015-04-22 11:35:31.731124"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (5.4ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:31.746721"], ["log", "2015-04-22 14:35:31: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:35:31.747317"], ["updated_at", "2015-04-22 11:35:31.747317"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:31.748716"], ["log", "2015-04-22 14:35:31: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:35:31.749135"], ["updated_at", "2015-04-22 11:35:31.749135"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:31.756574"], ["log", "2015-04-22 14:35:31: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:35:31.757055"], ["updated_at", "2015-04-22 11:35:31.757055"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:31.758475"], ["log", "2015-04-22 14:35:31: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:35:31.758842"], ["updated_at", "2015-04-22 11:35:31.758842"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report ---------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:31.764351"], ["log", "2015-04-22 14:35:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:31.764725"], ["updated_at", "2015-04-22 11:35:31.764725"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:31.767564"], ["log", "2015-04-22 14:35:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:31.768004"], ["updated_at", "2015-04-22 11:35:31.768004"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:35:31.769622"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:35:31.771804"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_5913032"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:31.773270"], ["log", "2015-04-22 14:35:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:31.773854"], ["updated_at", "2015-04-22 11:35:31.773854"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:31.783265"], ["log", "2015-04-22 14:35:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:31.783923"], ["updated_at", "2015-04-22 11:35:31.783923"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:35:31.786292"], ["log", "2015-04-22 14:35:31: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:35:31.786724"], ["updated_at", "2015-04-22 11:35:31.786724"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:35:31.787842"], ["log", "2015-04-22 14:35:31: LOCAL_TEST\n2015-04-22 14:35:31: TEST_2\n"], ["updated_at", "2015-04-22 11:35:31.788209"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:31.803276"], ["log", "2015-04-22 14:35:31: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:35:31.803682"], ["updated_at", "2015-04-22 11:35:31.803682"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:31.807146"], ["log", "2015-04-22 14:35:31: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:35:31.807579"], ["updated_at", "2015-04-22 11:35:31.807579"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:54.359398"], ["log", "2015-04-22 14:35:54: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:54.359902"], ["updated_at", "2015-04-22 11:35:54.359902"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:54.363438"], ["log", "2015-04-22 14:35:54: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:54.363779"], ["updated_at", "2015-04-22 11:35:54.363779"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:35:54.364822"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:35:54.368259"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_10167468"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:54.369857"], ["log", "2015-04-22 14:35:54: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:54.370373"], ["updated_at", "2015-04-22 11:35:54.370373"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:54.381515"], ["log", "2015-04-22 14:35:54: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:54.381910"], ["updated_at", "2015-04-22 11:35:54.381910"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:35:54.383975"], ["log", "2015-04-22 14:35:54: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:35:54.384302"], ["updated_at", "2015-04-22 11:35:54.384302"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:35:54.385249"], ["log", "2015-04-22 14:35:54: LOCAL_TEST\n2015-04-22 14:35:54: TEST_2\n"], ["updated_at", "2015-04-22 11:35:54.385604"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:54.390400"], ["log", "2015-04-22 14:35:54: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:35:54.390814"], ["updated_at", "2015-04-22 11:35:54.390814"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:54.392151"], ["log", "2015-04-22 14:35:54: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:35:54.392441"], ["updated_at", "2015-04-22 11:35:54.392441"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:54.398225"], ["log", "2015-04-22 14:35:54: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:35:54.398570"], ["updated_at", "2015-04-22 11:35:54.398570"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (5.3ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:54.399740"], ["log", "2015-04-22 14:35:54: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:35:54.405522"], ["updated_at", "2015-04-22 11:35:54.405522"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_81563720"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:54.409620"], ["log", "2015-04-22 14:35:54: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:54.409951"], ["updated_at", "2015-04-22 11:35:54.409951"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_80118771"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:54.410998"], ["log", "2015-04-22 14:35:54: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:35:54.411325"], ["updated_at", "2015-04-22 11:35:54.411325"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:54.415202"], ["log", "2015-04-22 14:35:54: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:35:54.415562"], ["updated_at", "2015-04-22 11:35:54.415562"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:35:54.416573"], ["log", "2015-04-22 14:35:54: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:35:54.416830"], ["updated_at", "2015-04-22 11:35:54.416830"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:35:54.419584"], ["log", "2015-04-22 14:35:54: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:35:54.419958"], ["updated_at", "2015-04-22 11:35:54.419958"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:35:54.424193"], ["log", "2015-04-22 14:35:54: ORIGINAL_STATUS\n2015-04-22 14:35:54: DELIVERED\n"], ["updated_at", "2015-04-22 11:35:54.424608"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:35:54.427599"], ["log", "2015-04-22 14:35:54: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:35:54.427973"], ["updated_at", "2015-04-22 11:35:54.427973"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:35:54.428943"], ["log", "2015-04-22 14:35:54: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:35:54.429222"], ["updated_at", "2015-04-22 11:35:54.429222"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:35:54.431855"], ["log", "2015-04-22 14:35:54: ORIGINAL_STATUS\n2015-04-22 14:35:54: DELIVERED\n"], ["updated_at", "2015-04-22 11:35:54.432258"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:35:54.433770"], ["log", "2015-04-22 14:35:54: ORIGINAL_STATUS\n2015-04-22 14:35:54: DELIVERED\n"], ["updated_at", "2015-04-22 11:35:54.434244"], ["id", 2]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 11:35:54.445772"], ["updated_at", "2015-04-22 11:35:54.445772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 11:35:54.448332"], ["updated_at", "2015-04-22 11:35:54.448332"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:54.457653' AND '2015-04-22 11:25:54.457915')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:54.457653' AND '2015-04-22 11:25:54.457915') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:54.457653' AND '2015-04-22 11:25:54.457915')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:54.457653' AND '2015-04-22 11:25:54.457915') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:54.457653' AND '2015-04-22 11:25:54.457915')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:54.457653' AND '2015-04-22 11:25:54.457915') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (12.7ms) Completed 200 OK in 16ms (Views: 15.2ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:35:54.469331"], ["updated_at", "2015-04-22 11:35:54.469331"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 11:35:54.470691"], ["updated_at", "2015-04-22 11:35:54.470691"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:54.473715' AND '2015-04-22 11:25:54.473786')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:54.473715' AND '2015-04-22 11:25:54.473786') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:54.473715' AND '2015-04-22 11:25:54.473786')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:54.473715' AND '2015-04-22 11:25:54.473786') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:54.473715' AND '2015-04-22 11:25:54.473786')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:35:54.473715' AND '2015-04-22 11:25:54.473786') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (5.0ms) Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 11:35:54.482921"], ["updated_at", "2015-04-22 11:35:54.482921"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:35:54.484142"], ["updated_at", "2015-04-22 11:35:54.484142"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (4.2ms) Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 14:35:54 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:37:15.600132"], ["log", "2015-04-22 14:37:15: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:37:15.600665"], ["updated_at", "2015-04-22 11:37:15.600665"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:37:15.607782"], ["log", "2015-04-22 14:37:15: ORIGINAL_STATUS\n2015-04-22 14:37:15: DELIVERED\n"], ["updated_at", "2015-04-22 11:37:15.608327"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.4ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:37:15.612046"], ["log", "2015-04-22 14:37:15: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:37:15.612409"], ["updated_at", "2015-04-22 11:37:15.612409"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:37:15.613328"], ["log", "2015-04-22 14:37:15: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:37:15.613586"], ["updated_at", "2015-04-22 11:37:15.613586"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:37:15.616011"], ["log", "2015-04-22 14:37:15: ORIGINAL_STATUS\n2015-04-22 14:37:15: DELIVERED\n"], ["updated_at", "2015-04-22 11:37:15.616413"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:37:15.617520"], ["log", "2015-04-22 14:37:15: ORIGINAL_STATUS\n2015-04-22 14:37:15: DELIVERED\n"], ["updated_at", "2015-04-22 11:37:15.617813"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:37:15.626195"], ["updated_at", "2015-04-22 11:37:15.626195"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 11:37:15.627451"], ["updated_at", "2015-04-22 11:37:15.627451"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:37:15.631639' AND '2015-04-22 11:27:15.631758')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:37:15.631639' AND '2015-04-22 11:27:15.631758') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:37:15.631639' AND '2015-04-22 11:27:15.631758')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:37:15.631639' AND '2015-04-22 11:27:15.631758') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:37:15.631639' AND '2015-04-22 11:27:15.631758')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:37:15.631639' AND '2015-04-22 11:27:15.631758') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.8ms) Completed 200 OK in 10ms (Views: 9.3ms | ActiveRecord: 0.4ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 11:37:15.640385"], ["updated_at", "2015-04-22 11:37:15.640385"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 11:37:15.641633"], ["updated_at", "2015-04-22 11:37:15.641633"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:37:15.644528' AND '2015-04-22 11:27:15.644695')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:37:15.644528' AND '2015-04-22 11:27:15.644695') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:37:15.644528' AND '2015-04-22 11:27:15.644695')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:37:15.644528' AND '2015-04-22 11:27:15.644695') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:37:15.644528' AND '2015-04-22 11:27:15.644695')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:37:15.644528' AND '2015-04-22 11:27:15.644695') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.4ms) Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 11:37:15.652629"], ["updated_at", "2015-04-22 11:37:15.652629"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:37:15.653936"], ["updated_at", "2015-04-22 11:37:15.653936"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (4.6ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:37:15.681967"], ["log", "2015-04-22 14:37:15: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:37:15.682442"], ["updated_at", "2015-04-22 11:37:15.682442"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:37:15.684710"], ["log", "2015-04-22 14:37:15: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:37:15.685083"], ["updated_at", "2015-04-22 11:37:15.685083"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:37:15.686896"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:37:15.689169"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_30232712"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:37:15.690528"], ["log", "2015-04-22 14:37:15: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:37:15.690888"], ["updated_at", "2015-04-22 11:37:15.690888"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:37:15.699454"], ["log", "2015-04-22 14:37:15: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:37:15.699890"], ["updated_at", "2015-04-22 11:37:15.699890"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:37:15.701805"], ["log", "2015-04-22 14:37:15: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:37:15.702163"], ["updated_at", "2015-04-22 11:37:15.702163"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:37:15.703100"], ["log", "2015-04-22 14:37:15: LOCAL_TEST\n2015-04-22 14:37:15: TEST_2\n"], ["updated_at", "2015-04-22 11:37:15.703427"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:37:15.707913"], ["log", "2015-04-22 14:37:15: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:37:15.708351"], ["updated_at", "2015-04-22 11:37:15.708351"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:37:15.709591"], ["log", "2015-04-22 14:37:15: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:37:15.709873"], ["updated_at", "2015-04-22 11:37:15.709873"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:37:15.716498"], ["log", "2015-04-22 14:37:15: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:37:15.716924"], ["updated_at", "2015-04-22 11:37:15.716924"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:37:15.718275"], ["log", "2015-04-22 14:37:15: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:37:15.718579"], ["updated_at", "2015-04-22 11:37:15.718579"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_33598041"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:37:15.723257"], ["log", "2015-04-22 14:37:15: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:37:15.723612"], ["updated_at", "2015-04-22 11:37:15.723612"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_48849079"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:37:15.724760"], ["log", "2015-04-22 14:37:15: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:37:15.725047"], ["updated_at", "2015-04-22 11:37:15.725047"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 14:37:15 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:37:15.741896"], ["log", "2015-04-22 14:37:15: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:37:15.742297"], ["updated_at", "2015-04-22 11:37:15.742297"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:37:15.744308"], ["log", "2015-04-22 14:37:15: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:37:15.744627"], ["updated_at", "2015-04-22 11:37:15.744627"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:11.061490"], ["log", "2015-04-22 14:38:11: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:38:11.061978"], ["updated_at", "2015-04-22 11:38:11.061978"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:11.064885"], ["log", "2015-04-22 14:38:11: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:38:11.065257"], ["updated_at", "2015-04-22 11:38:11.065257"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 14:38:11 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:11.076896"], ["log", "2015-04-22 14:38:11: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:38:11.077367"], ["updated_at", "2015-04-22 11:38:11.077367"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:11.078595"], ["log", "2015-04-22 14:38:11: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:38:11.078930"], ["updated_at", "2015-04-22 11:38:11.078930"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:38:11.082693"], ["log", "2015-04-22 14:38:11: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:38:11.083382"], ["updated_at", "2015-04-22 11:38:11.083382"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:38:11.088114"], ["log", "2015-04-22 14:38:11: ORIGINAL_STATUS\n2015-04-22 14:38:11: DELIVERED\n"], ["updated_at", "2015-04-22 11:38:11.088700"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:38:11.092214"], ["log", "2015-04-22 14:38:11: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:38:11.092571"], ["updated_at", "2015-04-22 11:38:11.092571"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:38:11.093533"], ["log", "2015-04-22 14:38:11: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:38:11.093818"], ["updated_at", "2015-04-22 11:38:11.093818"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:38:11.096604"], ["log", "2015-04-22 14:38:11: ORIGINAL_STATUS\n2015-04-22 14:38:11: DELIVERED\n"], ["updated_at", "2015-04-22 11:38:11.097020"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:38:11.098363"], ["log", "2015-04-22 14:38:11: ORIGINAL_STATUS\n2015-04-22 14:38:11: DELIVERED\n"], ["updated_at", "2015-04-22 11:38:11.098717"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:38:11.106372"], ["updated_at", "2015-04-22 11:38:11.106372"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:38:11.107521"], ["updated_at", "2015-04-22 11:38:11.107521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:11.111771' AND '2015-04-22 11:28:11.111896')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:11.111771' AND '2015-04-22 11:28:11.111896') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:11.111771' AND '2015-04-22 11:28:11.111896')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:11.111771' AND '2015-04-22 11:28:11.111896') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:11.111771' AND '2015-04-22 11:28:11.111896')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:11.111771' AND '2015-04-22 11:28:11.111896') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (14.0ms) Completed 200 OK in 16ms (Views: 15.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:38:11.126330"], ["updated_at", "2015-04-22 11:38:11.126330"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 11:38:11.127594"], ["updated_at", "2015-04-22 11:38:11.127594"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:11.130564' AND '2015-04-22 11:28:11.130639')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:11.130564' AND '2015-04-22 11:28:11.130639') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:11.130564' AND '2015-04-22 11:28:11.130639')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:11.130564' AND '2015-04-22 11:28:11.130639') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:11.130564' AND '2015-04-22 11:28:11.130639')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:11.130564' AND '2015-04-22 11:28:11.130639') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.9ms) Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.5ms)  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 11:38:11.139655"], ["updated_at", "2015-04-22 11:38:11.139655"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:38:11.140965"], ["updated_at", "2015-04-22 11:38:11.140965"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_20745599"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:11.146911"], ["log", "2015-04-22 14:38:11: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:38:11.147386"], ["updated_at", "2015-04-22 11:38:11.147386"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_30145714"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:11.148859"], ["log", "2015-04-22 14:38:11: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:38:11.149164"], ["updated_at", "2015-04-22 11:38:11.149164"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:11.152852"], ["log", "2015-04-22 14:38:11: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:38:11.153209"], ["updated_at", "2015-04-22 11:38:11.153209"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:11.155233"], ["log", "2015-04-22 14:38:11: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:38:11.155566"], ["updated_at", "2015-04-22 11:38:11.155566"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:38:11.156730"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:38:11.158605"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_37452313"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:11.159855"], ["log", "2015-04-22 14:38:11: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:38:11.160192"], ["updated_at", "2015-04-22 11:38:11.160192"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:11.171224"], ["log", "2015-04-22 14:38:11: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:38:11.171603"], ["updated_at", "2015-04-22 11:38:11.171603"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:38:11.173531"], ["log", "2015-04-22 14:38:11: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:38:11.174068"], ["updated_at", "2015-04-22 11:38:11.174068"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:38:11.175328"], ["log", "2015-04-22 14:38:11: LOCAL_TEST\n2015-04-22 14:38:11: TEST_2\n"], ["updated_at", "2015-04-22 11:38:11.175682"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.4ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:11.192110"], ["log", "2015-04-22 14:38:11: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:38:11.192836"], ["updated_at", "2015-04-22 11:38:11.192836"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:11.194970"], ["log", "2015-04-22 14:38:11: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:38:11.195299"], ["updated_at", "2015-04-22 11:38:11.195299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 14:38:35 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:35.175809"], ["log", "2015-04-22 14:38:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:38:35.176244"], ["updated_at", "2015-04-22 11:38:35.176244"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:35.179435"], ["log", "2015-04-22 14:38:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:38:35.179736"], ["updated_at", "2015-04-22 11:38:35.179736"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:38:35.180769"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:38:35.184227"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_870192"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:35.185665"], ["log", "2015-04-22 14:38:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:38:35.186168"], ["updated_at", "2015-04-22 11:38:35.186168"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:35.196535"], ["log", "2015-04-22 14:38:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:38:35.196909"], ["updated_at", "2015-04-22 11:38:35.196909"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:38:35.198767"], ["log", "2015-04-22 14:38:35: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:38:35.199108"], ["updated_at", "2015-04-22 11:38:35.199108"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:38:35.200075"], ["log", "2015-04-22 14:38:35: LOCAL_TEST\n2015-04-22 14:38:35: TEST_2\n"], ["updated_at", "2015-04-22 11:38:35.200355"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:35.204423"], ["log", "2015-04-22 14:38:35: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:38:35.204841"], ["updated_at", "2015-04-22 11:38:35.204841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:35.205998"], ["log", "2015-04-22 14:38:35: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:38:35.206281"], ["updated_at", "2015-04-22 11:38:35.206281"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:35.223078"], ["log", "2015-04-22 14:38:35: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:38:35.223501"], ["updated_at", "2015-04-22 11:38:35.223501"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:35.224626"], ["log", "2015-04-22 14:38:35: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:38:35.224954"], ["updated_at", "2015-04-22 11:38:35.224954"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:35.230842"], ["log", "2015-04-22 14:38:35: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:38:35.231218"], ["updated_at", "2015-04-22 11:38:35.231218"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:35.232369"], ["log", "2015-04-22 14:38:35: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:38:35.232669"], ["updated_at", "2015-04-22 11:38:35.232669"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_31204358"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:35.236198"], ["log", "2015-04-22 14:38:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:38:35.236547"], ["updated_at", "2015-04-22 11:38:35.236547"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_99906540"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:38:35.237557"], ["log", "2015-04-22 14:38:35: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:38:35.237842"], ["updated_at", "2015-04-22 11:38:35.237842"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:38:35.240255"], ["log", "2015-04-22 14:38:35: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:38:35.240596"], ["updated_at", "2015-04-22 11:38:35.240596"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:38:35.244424"], ["log", "2015-04-22 14:38:35: ORIGINAL_STATUS\n2015-04-22 14:38:35: DELIVERED\n"], ["updated_at", "2015-04-22 11:38:35.244816"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:38:35.247500"], ["log", "2015-04-22 14:38:35: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:38:35.247925"], ["updated_at", "2015-04-22 11:38:35.247925"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:38:35.249489"], ["log", "2015-04-22 14:38:35: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:38:35.249972"], ["updated_at", "2015-04-22 11:38:35.249972"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:38:35.252989"], ["log", "2015-04-22 14:38:35: ORIGINAL_STATUS\n2015-04-22 14:38:35: DELIVERED\n"], ["updated_at", "2015-04-22 11:38:35.253469"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:38:35.254761"], ["log", "2015-04-22 14:38:35: ORIGINAL_STATUS\n2015-04-22 14:38:35: DELIVERED\n"], ["updated_at", "2015-04-22 11:38:35.255114"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:38:35.263204"], ["updated_at", "2015-04-22 11:38:35.263204"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:38:35.264479"], ["updated_at", "2015-04-22 11:38:35.264479"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:35.269316' AND '2015-04-22 11:28:35.269460')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:35.269316' AND '2015-04-22 11:28:35.269460') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:35.269316' AND '2015-04-22 11:28:35.269460')  (0.2ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:35.269316' AND '2015-04-22 11:28:35.269460') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:35.269316' AND '2015-04-22 11:28:35.269460')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:35.269316' AND '2015-04-22 11:28:35.269460') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (8.8ms) Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:38:35.278772"], ["updated_at", "2015-04-22 11:38:35.278772"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 11:38:35.280318"], ["updated_at", "2015-04-22 11:38:35.280318"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:35.283553' AND '2015-04-22 11:28:35.283646')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:35.283553' AND '2015-04-22 11:28:35.283646') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:35.283553' AND '2015-04-22 11:28:35.283646')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:35.283553' AND '2015-04-22 11:28:35.283646') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:35.283553' AND '2015-04-22 11:28:35.283646')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:38:35.283553' AND '2015-04-22 11:28:35.283646') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (6.8ms) Completed 200 OK in 8ms (Views: 7.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:38:35.296397"], ["updated_at", "2015-04-22 11:38:35.296397"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 11:38:35.298592"], ["updated_at", "2015-04-22 11:38:35.298592"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.8ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) 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 -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_43584198"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:39:11.045658"], ["log", "2015-04-22 14:39:11: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:39:11.046169"], ["updated_at", "2015-04-22 11:39:11.046169"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_22853386"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:39:11.048737"], ["log", "2015-04-22 14:39:11: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:39:11.049299"], ["updated_at", "2015-04-22 11:39:11.049299"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 14:39:11 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:39:11.068994"], ["log", "2015-04-22 14:39:11: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:39:11.069398"], ["updated_at", "2015-04-22 11:39:11.069398"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:39:11.070600"], ["log", "2015-04-22 14:39:11: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:39:11.070914"], ["updated_at", "2015-04-22 11:39:11.070914"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:39:11.073494"], ["log", "2015-04-22 14:39:11: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:39:11.073856"], ["updated_at", "2015-04-22 11:39:11.073856"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:39:11.078533"], ["log", "2015-04-22 14:39:11: ORIGINAL_STATUS\n2015-04-22 14:39:11: DELIVERED\n"], ["updated_at", "2015-04-22 11:39:11.079072"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:39:11.082907"], ["log", "2015-04-22 14:39:11: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:39:11.083373"], ["updated_at", "2015-04-22 11:39:11.083373"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:39:11.084400"], ["log", "2015-04-22 14:39:11: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:39:11.084682"], ["updated_at", "2015-04-22 11:39:11.084682"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:39:11.087211"], ["log", "2015-04-22 14:39:11: ORIGINAL_STATUS\n2015-04-22 14:39:11: DELIVERED\n"], ["updated_at", "2015-04-22 11:39:11.087594"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:39:11.088882"], ["log", "2015-04-22 14:39:11: ORIGINAL_STATUS\n2015-04-22 14:39:11: DELIVERED\n"], ["updated_at", "2015-04-22 11:39:11.089208"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 11:39:11.096020"], ["updated_at", "2015-04-22 11:39:11.096020"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 11:39:11.097166"], ["updated_at", "2015-04-22 11:39:11.097166"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:11.107567' AND '2015-04-22 11:29:11.107721')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:11.107567' AND '2015-04-22 11:29:11.107721') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:11.107567' AND '2015-04-22 11:29:11.107721')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:11.107567' AND '2015-04-22 11:29:11.107721') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:11.107567' AND '2015-04-22 11:29:11.107721')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:11.107567' AND '2015-04-22 11:29:11.107721') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (8.5ms) Completed 200 OK in 16ms (Views: 15.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:39:11.116577"], ["updated_at", "2015-04-22 11:39:11.116577"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 11:39:11.117940"], ["updated_at", "2015-04-22 11:39:11.117940"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:11.121047' AND '2015-04-22 11:29:11.121131')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:11.121047' AND '2015-04-22 11:29:11.121131') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:11.121047' AND '2015-04-22 11:29:11.121131')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:11.121047' AND '2015-04-22 11:29:11.121131') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:11.121047' AND '2015-04-22 11:29:11.121131')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:11.121047' AND '2015-04-22 11:29:11.121131') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.9ms) Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:39:11.130358"], ["updated_at", "2015-04-22 11:39:11.130358"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 11:39:11.131972"], ["updated_at", "2015-04-22 11:39:11.131972"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:39:11.135859"], ["log", "2015-04-22 14:39:11: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:39:11.136188"], ["updated_at", "2015-04-22 11:39:11.136188"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:39:11.138056"], ["log", "2015-04-22 14:39:11: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:39:11.138395"], ["updated_at", "2015-04-22 11:39:11.138395"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:39:11.139693"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:39:11.141457"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_20885459"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:39:11.142625"], ["log", "2015-04-22 14:39:11: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:39:11.142939"], ["updated_at", "2015-04-22 11:39:11.142939"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:39:11.153882"], ["log", "2015-04-22 14:39:11: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:39:11.154339"], ["updated_at", "2015-04-22 11:39:11.154339"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:39:11.156285"], ["log", "2015-04-22 14:39:11: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:39:11.156610"], ["updated_at", "2015-04-22 11:39:11.156610"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:39:11.157515"], ["log", "2015-04-22 14:39:11: LOCAL_TEST\n2015-04-22 14:39:11: TEST_2\n"], ["updated_at", "2015-04-22 11:39:11.157846"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:39:11.163738"], ["log", "2015-04-22 14:39:11: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:39:11.164260"], ["updated_at", "2015-04-22 11:39:11.164260"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:39:11.165905"], ["log", "2015-04-22 14:39:11: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:39:11.166295"], ["updated_at", "2015-04-22 11:39:11.166295"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:39:11.176927"], ["log", "2015-04-22 14:39:11: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:39:11.177384"], ["updated_at", "2015-04-22 11:39:11.177384"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:39:11.179830"], ["log", "2015-04-22 14:39:11: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:39:11.180567"], ["updated_at", "2015-04-22 11:39:11.180567"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_30271126"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:39:27.363061"], ["log", "2015-04-22 14:39:27: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:39:27.363696"], ["updated_at", "2015-04-22 11:39:27.363696"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_9132255"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:39:27.367964"], ["log", "2015-04-22 14:39:27: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:39:27.368433"], ["updated_at", "2015-04-22 11:39:27.368433"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:39:27.371663"], ["log", "2015-04-22 14:39:27: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:39:27.372154"], ["updated_at", "2015-04-22 11:39:27.372154"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:39:27.378594"], ["log", "2015-04-22 14:39:27: ORIGINAL_STATUS\n2015-04-22 14:39:27: DELIVERED\n"], ["updated_at", "2015-04-22 11:39:27.379286"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.6ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:39:27.384097"], ["log", "2015-04-22 14:39:27: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:39:27.384797"], ["updated_at", "2015-04-22 11:39:27.384797"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:39:27.387355"], ["log", "2015-04-22 14:39:27: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:39:27.387851"], ["updated_at", "2015-04-22 11:39:27.387851"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:39:27.390885"], ["log", "2015-04-22 14:39:27: ORIGINAL_STATUS\n2015-04-22 14:39:27: DELIVERED\n"], ["updated_at", "2015-04-22 11:39:27.391329"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:39:27.392812"], ["log", "2015-04-22 14:39:27: ORIGINAL_STATUS\n2015-04-22 14:39:27: DELIVERED\n"], ["updated_at", "2015-04-22 11:39:27.393167"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"gateway_not_found", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"test_gateway", "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:39:27.403200"], ["updated_at", "2015-04-22 11:39:27.403200"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 11:39:27.405289"], ["updated_at", "2015-04-22 11:39:27.405289"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:27.410757' AND '2015-04-22 11:29:27.410943')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:27.410757' AND '2015-04-22 11:29:27.410943') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:27.410757' AND '2015-04-22 11:29:27.410943')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:27.410757' AND '2015-04-22 11:29:27.410943') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:27.410757' AND '2015-04-22 11:29:27.410943')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:27.410757' AND '2015-04-22 11:29:27.410943') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (15.6ms) Completed 200 OK in 18ms (Views: 17.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:39:27.427088"], ["updated_at", "2015-04-22 11:39:27.427088"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:39:27.428489"], ["updated_at", "2015-04-22 11:39:27.428489"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:27.431649' AND '2015-04-22 11:29:27.431719')  (0.2ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:27.431649' AND '2015-04-22 11:29:27.431719') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:27.431649' AND '2015-04-22 11:29:27.431719')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:27.431649' AND '2015-04-22 11:29:27.431719') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:27.431649' AND '2015-04-22 11:29:27.431719')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:39:27.431649' AND '2015-04-22 11:29:27.431719') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (6.7ms) Completed 200 OK in 8ms (Views: 7.2ms | ActiveRecord: 0.8ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:39:27.447110"], ["updated_at", "2015-04-22 11:39:27.447110"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 11:39:27.449513"], ["updated_at", "2015-04-22 11:39:27.449513"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.3ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (12.3ms) Completed 200 OK in 15ms (Views: 14.3ms | ActiveRecord: 0.3ms) Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (1.4ms) Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.5ms) Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (1.0ms) Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:41:41.199722"], ["log", "2015-04-22 14:41:41: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:41:41.200106"], ["updated_at", "2015-04-22 11:41:41.200106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:41:41.201510"], ["log", "2015-04-22 14:41:41: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:41:41.201829"], ["updated_at", "2015-04-22 11:41:41.201829"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:41:41.207843"], ["log", "2015-04-22 14:41:41: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:41:41.208181"], ["updated_at", "2015-04-22 11:41:41.208181"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:41:41.209395"], ["log", "2015-04-22 14:41:41: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:41:41.209664"], ["updated_at", "2015-04-22 11:41:41.209664"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:41:41.212885"], ["log", "2015-04-22 14:41:41: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:41:41.213154"], ["updated_at", "2015-04-22 11:41:41.213154"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:41:41.215468"], ["log", "2015-04-22 14:41:41: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:41:41.215966"], ["updated_at", "2015-04-22 11:41:41.215966"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:41:41.217380"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:41:41.219113"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_58273956"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:41:41.220414"], ["log", "2015-04-22 14:41:41: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:41:41.220701"], ["updated_at", "2015-04-22 11:41:41.220701"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:41:41.227951"], ["log", "2015-04-22 14:41:41: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:41:41.228322"], ["updated_at", "2015-04-22 11:41:41.228322"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:41:41.230105"], ["log", "2015-04-22 14:41:41: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:41:41.230409"], ["updated_at", "2015-04-22 11:41:41.230409"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:41:41.231308"], ["log", "2015-04-22 14:41:41: LOCAL_TEST\n2015-04-22 14:41:41: TEST_2\n"], ["updated_at", "2015-04-22 11:41:41.231571"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 14:41:41 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:41:41.241006"], ["log", "2015-04-22 14:41:41: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:41:41.241448"], ["updated_at", "2015-04-22 11:41:41.241448"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:41:41.242531"], ["log", "2015-04-22 14:41:41: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:41:41.242790"], ["updated_at", "2015-04-22 11:41:41.242790"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:42:00.376114"], ["log", "2015-04-22 14:42:00: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:42:00.376729"], ["updated_at", "2015-04-22 11:42:00.376729"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:42:00.383658"], ["log", "2015-04-22 14:42:00: ORIGINAL_STATUS\n2015-04-22 14:42:00: DELIVERED\n"], ["updated_at", "2015-04-22 11:42:00.384162"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:42:00.388792"], ["log", "2015-04-22 14:42:00: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:42:00.389376"], ["updated_at", "2015-04-22 11:42:00.389376"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:42:00.390544"], ["log", "2015-04-22 14:42:00: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:42:00.390883"], ["updated_at", "2015-04-22 11:42:00.390883"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:42:00.394206"], ["log", "2015-04-22 14:42:00: ORIGINAL_STATUS\n2015-04-22 14:42:00: DELIVERED\n"], ["updated_at", "2015-04-22 11:42:00.394633"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:42:00.396027"], ["log", "2015-04-22 14:42:00: ORIGINAL_STATUS\n2015-04-22 14:42:00: DELIVERED\n"], ["updated_at", "2015-04-22 11:42:00.396411"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:42:00.405036"], ["updated_at", "2015-04-22 11:42:00.405036"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:42:00.406315"], ["updated_at", "2015-04-22 11:42:00.406315"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:00.411059' AND '2015-04-22 11:32:00.411226')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:00.411059' AND '2015-04-22 11:32:00.411226') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:00.411059' AND '2015-04-22 11:32:00.411226')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:00.411059' AND '2015-04-22 11:32:00.411226') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:00.411059' AND '2015-04-22 11:32:00.411226')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:00.411059' AND '2015-04-22 11:32:00.411226') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.7ms) Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:42:00.419339"], ["updated_at", "2015-04-22 11:42:00.419339"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:42:00.421001"], ["updated_at", "2015-04-22 11:42:00.421001"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:00.429969' AND '2015-04-22 11:32:00.430044')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:00.429969' AND '2015-04-22 11:32:00.430044') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:00.429969' AND '2015-04-22 11:32:00.430044')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:00.429969' AND '2015-04-22 11:32:00.430044') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:00.429969' AND '2015-04-22 11:32:00.430044')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:00.429969' AND '2015-04-22 11:32:00.430044') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.6ms) Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 11:42:00.439419"], ["updated_at", "2015-04-22 11:42:00.439419"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 11:42:00.441361"], ["updated_at", "2015-04-22 11:42:00.441361"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.3ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (8.3ms) Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.3ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_31237212"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:00.459891"], ["log", "2015-04-22 14:42:00: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:42:00.460342"], ["updated_at", "2015-04-22 11:42:00.460342"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_98109391"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:00.461668"], ["log", "2015-04-22 14:42:00: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:42:00.462007"], ["updated_at", "2015-04-22 11:42:00.462007"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 14:42:00 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:00.473611"], ["log", "2015-04-22 14:42:00: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:42:00.474065"], ["updated_at", "2015-04-22 11:42:00.474065"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:00.475491"], ["log", "2015-04-22 14:42:00: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:42:00.475816"], ["updated_at", "2015-04-22 11:42:00.475816"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:00.482120"], ["log", "2015-04-22 14:42:00: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:42:00.482549"], ["updated_at", "2015-04-22 11:42:00.482549"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:00.483923"], ["log", "2015-04-22 14:42:00: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:42:00.484277"], ["updated_at", "2015-04-22 11:42:00.484277"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:00.487998"], ["log", "2015-04-22 14:42:00: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:42:00.488381"], ["updated_at", "2015-04-22 11:42:00.488381"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:00.490653"], ["log", "2015-04-22 14:42:00: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:42:00.490978"], ["updated_at", "2015-04-22 11:42:00.490978"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:42:00.492207"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:42:00.493878"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_95153573"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:00.495045"], ["log", "2015-04-22 14:42:00: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:42:00.495388"], ["updated_at", "2015-04-22 11:42:00.495388"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.3ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:00.507082"], ["log", "2015-04-22 14:42:00: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:42:00.507850"], ["updated_at", "2015-04-22 11:42:00.507850"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:42:00.510206"], ["log", "2015-04-22 14:42:00: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:42:00.510749"], ["updated_at", "2015-04-22 11:42:00.510749"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:42:00.511951"], ["log", "2015-04-22 14:42:00: LOCAL_TEST\n2015-04-22 14:42:00: TEST_2\n"], ["updated_at", "2015-04-22 11:42:00.512286"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:00.518641"], ["log", "2015-04-22 14:42:00: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:42:00.519000"], ["updated_at", "2015-04-22 11:42:00.519000"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:00.521122"], ["log", "2015-04-22 14:42:00: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:42:00.521516"], ["updated_at", "2015-04-22 11:42:00.521516"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_69890557"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:43.670972"], ["log", "2015-04-22 14:42:43: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:42:43.671531"], ["updated_at", "2015-04-22 11:42:43.671531"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_96581828"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:43.674743"], ["log", "2015-04-22 14:42:43: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:42:43.675099"], ["updated_at", "2015-04-22 11:42:43.675099"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 14:42:43 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:43.693961"], ["log", "2015-04-22 14:42:43: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:42:43.694377"], ["updated_at", "2015-04-22 11:42:43.694377"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:43.695611"], ["log", "2015-04-22 14:42:43: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:42:43.695899"], ["updated_at", "2015-04-22 11:42:43.695899"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:43.701664"], ["log", "2015-04-22 14:42:43: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:42:43.702021"], ["updated_at", "2015-04-22 11:42:43.702021"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:43.703306"], ["log", "2015-04-22 14:42:43: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:42:43.703631"], ["updated_at", "2015-04-22 11:42:43.703631"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:43.708916"], ["log", "2015-04-22 14:42:43: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:42:43.709321"], ["updated_at", "2015-04-22 11:42:43.709321"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:43.710703"], ["log", "2015-04-22 14:42:43: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:42:43.711020"], ["updated_at", "2015-04-22 11:42:43.711020"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:43.714842"], ["log", "2015-04-22 14:42:43: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:42:43.715175"], ["updated_at", "2015-04-22 11:42:43.715175"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:43.716869"], ["log", "2015-04-22 14:42:43: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:42:43.717161"], ["updated_at", "2015-04-22 11:42:43.717161"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:42:43.718214"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:42:43.727984"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_49244433"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:43.729273"], ["log", "2015-04-22 14:42:43: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:42:43.729560"], ["updated_at", "2015-04-22 11:42:43.729560"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:42:43.739856"], ["log", "2015-04-22 14:42:43: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:42:43.740417"], ["updated_at", "2015-04-22 11:42:43.740417"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:42:43.742559"], ["log", "2015-04-22 14:42:43: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:42:43.742885"], ["updated_at", "2015-04-22 11:42:43.742885"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:42:43.743854"], ["log", "2015-04-22 14:42:43: LOCAL_TEST\n2015-04-22 14:42:43: TEST_2\n"], ["updated_at", "2015-04-22 11:42:43.744146"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:42:43.746222"], ["log", "2015-04-22 14:42:43: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:42:43.746576"], ["updated_at", "2015-04-22 11:42:43.746576"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:42:43.750404"], ["log", "2015-04-22 14:42:43: ORIGINAL_STATUS\n2015-04-22 14:42:43: DELIVERED\n"], ["updated_at", "2015-04-22 11:42:43.750865"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:42:43.754053"], ["log", "2015-04-22 14:42:43: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:42:43.754437"], ["updated_at", "2015-04-22 11:42:43.754437"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:42:43.755489"], ["log", "2015-04-22 14:42:43: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:42:43.755759"], ["updated_at", "2015-04-22 11:42:43.755759"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:42:43.759545"], ["log", "2015-04-22 14:42:43: ORIGINAL_STATUS\n2015-04-22 14:42:43: DELIVERED\n"], ["updated_at", "2015-04-22 11:42:43.760019"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:42:43.761359"], ["log", "2015-04-22 14:42:43: ORIGINAL_STATUS\n2015-04-22 14:42:43: DELIVERED\n"], ["updated_at", "2015-04-22 11:42:43.761753"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 11:42:43.768800"], ["updated_at", "2015-04-22 11:42:43.768800"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 11:42:43.769917"], ["updated_at", "2015-04-22 11:42:43.769917"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:43.774585' AND '2015-04-22 11:32:43.774799')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:43.774585' AND '2015-04-22 11:32:43.774799') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:43.774585' AND '2015-04-22 11:32:43.774799')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:43.774585' AND '2015-04-22 11:32:43.774799') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:43.774585' AND '2015-04-22 11:32:43.774799')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:43.774585' AND '2015-04-22 11:32:43.774799') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (8.4ms) Completed 200 OK in 10ms (Views: 9.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 11:42:43.783088"], ["updated_at", "2015-04-22 11:42:43.783088"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 11:42:43.785115"], ["updated_at", "2015-04-22 11:42:43.785115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:43.788120' AND '2015-04-22 11:32:43.788213')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:43.788120' AND '2015-04-22 11:32:43.788213') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:43.788120' AND '2015-04-22 11:32:43.788213')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:43.788120' AND '2015-04-22 11:32:43.788213') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:43.788120' AND '2015-04-22 11:32:43.788213')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:42:43.788120' AND '2015-04-22 11:32:43.788213') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (9.1ms) Completed 200 OK in 10ms (Views: 9.7ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:42:43.803102"], ["updated_at", "2015-04-22 11:42:43.803102"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 11:42:43.805433"], ["updated_at", "2015-04-22 11:42:43.805433"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.3ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (5.5ms) Completed 200 OK in 7ms (Views: 6.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 14:43:06 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:06.880991"], ["log", "2015-04-22 14:43:06: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:43:06.881626"], ["updated_at", "2015-04-22 11:43:06.881626"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:06.884360"], ["log", "2015-04-22 14:43:06: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:43:06.884665"], ["updated_at", "2015-04-22 11:43:06.884665"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:43:06.896370"], ["log", "2015-04-22 14:43:06: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:43:06.896781"], ["updated_at", "2015-04-22 11:43:06.896781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:43:06.901444"], ["log", "2015-04-22 14:43:06: ORIGINAL_STATUS\n2015-04-22 14:43:06: DELIVERED\n"], ["updated_at", "2015-04-22 11:43:06.902014"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:43:06.905694"], ["log", "2015-04-22 14:43:06: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:43:06.906065"], ["updated_at", "2015-04-22 11:43:06.906065"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:43:06.907088"], ["log", "2015-04-22 14:43:06: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:43:06.907449"], ["updated_at", "2015-04-22 11:43:06.907449"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:43:06.910714"], ["log", "2015-04-22 14:43:06: ORIGINAL_STATUS\n2015-04-22 14:43:06: DELIVERED\n"], ["updated_at", "2015-04-22 11:43:06.911163"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:43:06.912393"], ["log", "2015-04-22 14:43:06: ORIGINAL_STATUS\n2015-04-22 14:43:06: DELIVERED\n"], ["updated_at", "2015-04-22 11:43:06.912697"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:43:06.919124"], ["updated_at", "2015-04-22 11:43:06.919124"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:43:06.920249"], ["updated_at", "2015-04-22 11:43:06.920249"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:06.930723' AND '2015-04-22 11:33:06.930859')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:06.930723' AND '2015-04-22 11:33:06.930859') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:06.930723' AND '2015-04-22 11:33:06.930859')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:06.930723' AND '2015-04-22 11:33:06.930859') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:06.930723' AND '2015-04-22 11:33:06.930859')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:06.930723' AND '2015-04-22 11:33:06.930859') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (14.4ms) Completed 200 OK in 17ms (Views: 16.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 11:43:06.939707"], ["updated_at", "2015-04-22 11:43:06.939707"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:43:06.941034"], ["updated_at", "2015-04-22 11:43:06.941034"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:06.944009' AND '2015-04-22 11:33:06.944094')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:06.944009' AND '2015-04-22 11:33:06.944094') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:06.944009' AND '2015-04-22 11:33:06.944094')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:06.944009' AND '2015-04-22 11:33:06.944094') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:06.944009' AND '2015-04-22 11:33:06.944094')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:06.944009' AND '2015-04-22 11:33:06.944094') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.7ms) Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:43:06.952510"], ["updated_at", "2015-04-22 11:43:06.952510"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:43:06.953864"], ["updated_at", "2015-04-22 11:43:06.953864"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (4.7ms) Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:06.966117"], ["log", "2015-04-22 14:43:06: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:43:06.966500"], ["updated_at", "2015-04-22 11:43:06.966500"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:06.967688"], ["log", "2015-04-22 14:43:06: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:43:06.967978"], ["updated_at", "2015-04-22 11:43:06.967978"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:06.972205"], ["log", "2015-04-22 14:43:06: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:43:06.972514"], ["updated_at", "2015-04-22 11:43:06.972514"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:06.973682"], ["log", "2015-04-22 14:43:06: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:43:06.973944"], ["updated_at", "2015-04-22 11:43:06.973944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_91752900"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:06.978017"], ["log", "2015-04-22 14:43:06: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:43:06.978336"], ["updated_at", "2015-04-22 11:43:06.978336"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_23527361"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:06.979417"], ["log", "2015-04-22 14:43:06: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:43:06.979702"], ["updated_at", "2015-04-22 11:43:06.979702"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:06.983206"], ["log", "2015-04-22 14:43:06: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:43:06.983622"], ["updated_at", "2015-04-22 11:43:06.983622"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:06.985929"], ["log", "2015-04-22 14:43:06: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:43:06.986327"], ["updated_at", "2015-04-22 11:43:06.986327"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:43:06.987665"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:43:06.989502"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_52230908"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:06.990684"], ["log", "2015-04-22 14:43:06: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:43:06.991030"], ["updated_at", "2015-04-22 11:43:06.991030"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:07.003141"], ["log", "2015-04-22 14:43:07: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:43:07.003536"], ["updated_at", "2015-04-22 11:43:07.003536"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:43:07.005688"], ["log", "2015-04-22 14:43:07: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:43:07.006219"], ["updated_at", "2015-04-22 11:43:07.006219"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:43:07.007319"], ["log", "2015-04-22 14:43:07: LOCAL_TEST\n2015-04-22 14:43:07: TEST_2\n"], ["updated_at", "2015-04-22 11:43:07.007586"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:37.461250"], ["log", "2015-04-22 14:43:37: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:43:37.462000"], ["updated_at", "2015-04-22 11:43:37.462000"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:37.465087"], ["log", "2015-04-22 14:43:37: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:43:37.465482"], ["updated_at", "2015-04-22 11:43:37.465482"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:37.470690"], ["log", "2015-04-22 14:43:37: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:43:37.471018"], ["updated_at", "2015-04-22 11:43:37.471018"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:37.472044"], ["log", "2015-04-22 14:43:37: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:43:37.472311"], ["updated_at", "2015-04-22 11:43:37.472311"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 14:43:37 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_63908887"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:37.483204"], ["log", "2015-04-22 14:43:37: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:43:37.483579"], ["updated_at", "2015-04-22 11:43:37.483579"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_70481201"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:37.485084"], ["log", "2015-04-22 14:43:37: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:43:37.485411"], ["updated_at", "2015-04-22 11:43:37.485411"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:43:37.488293"], ["log", "2015-04-22 14:43:37: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:43:37.488671"], ["updated_at", "2015-04-22 11:43:37.488671"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:43:37.493817"], ["log", "2015-04-22 14:43:37: ORIGINAL_STATUS\n2015-04-22 14:43:37: DELIVERED\n"], ["updated_at", "2015-04-22 11:43:37.494342"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:43:37.497846"], ["log", "2015-04-22 14:43:37: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:43:37.498185"], ["updated_at", "2015-04-22 11:43:37.498185"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:43:37.499240"], ["log", "2015-04-22 14:43:37: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:43:37.499516"], ["updated_at", "2015-04-22 11:43:37.499516"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:43:37.502559"], ["log", "2015-04-22 14:43:37: ORIGINAL_STATUS\n2015-04-22 14:43:37: DELIVERED\n"], ["updated_at", "2015-04-22 11:43:37.502938"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:43:37.504126"], ["log", "2015-04-22 14:43:37: ORIGINAL_STATUS\n2015-04-22 14:43:37: DELIVERED\n"], ["updated_at", "2015-04-22 11:43:37.504532"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:43:37.512960"], ["updated_at", "2015-04-22 11:43:37.512960"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:43:37.514203"], ["updated_at", "2015-04-22 11:43:37.514203"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:37.523378' AND '2015-04-22 11:33:37.523505')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:37.523378' AND '2015-04-22 11:33:37.523505') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:37.523378' AND '2015-04-22 11:33:37.523505')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:37.523378' AND '2015-04-22 11:33:37.523505') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:37.523378' AND '2015-04-22 11:33:37.523505')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:37.523378' AND '2015-04-22 11:33:37.523505') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (8.9ms) Completed 200 OK in 11ms (Views: 10.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 11:43:37.533167"], ["updated_at", "2015-04-22 11:43:37.533167"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:43:37.534406"], ["updated_at", "2015-04-22 11:43:37.534406"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:37.537067' AND '2015-04-22 11:33:37.537138')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:37.537067' AND '2015-04-22 11:33:37.537138') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:37.537067' AND '2015-04-22 11:33:37.537138')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:37.537067' AND '2015-04-22 11:33:37.537138') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:37.537067' AND '2015-04-22 11:33:37.537138')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:43:37.537067' AND '2015-04-22 11:33:37.537138') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (5.2ms) Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 11:43:37.545932"], ["updated_at", "2015-04-22 11:43:37.545932"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 11:43:37.546998"], ["updated_at", "2015-04-22 11:43:37.546998"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (5.1ms) Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:37.559082"], ["log", "2015-04-22 14:43:37: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:43:37.559508"], ["updated_at", "2015-04-22 11:43:37.559508"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:37.560754"], ["log", "2015-04-22 14:43:37: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:43:37.561026"], ["updated_at", "2015-04-22 11:43:37.561026"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:37.574105"], ["log", "2015-04-22 14:43:37: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:43:37.574523"], ["updated_at", "2015-04-22 11:43:37.574523"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:37.576603"], ["log", "2015-04-22 14:43:37: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:43:37.576917"], ["updated_at", "2015-04-22 11:43:37.576917"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:43:37.578120"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:43:37.580058"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_71707569"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:37.581288"], ["log", "2015-04-22 14:43:37: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:43:37.581593"], ["updated_at", "2015-04-22 11:43:37.581593"]]  (0.5ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:43:37.596967"], ["log", "2015-04-22 14:43:37: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:43:37.597338"], ["updated_at", "2015-04-22 11:43:37.597338"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:43:37.600094"], ["log", "2015-04-22 14:43:37: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:43:37.600996"], ["updated_at", "2015-04-22 11:43:37.600996"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:43:37.602904"], ["log", "2015-04-22 14:43:37: LOCAL_TEST\n2015-04-22 14:43:37: TEST_2\n"], ["updated_at", "2015-04-22 11:43:37.603269"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:55:59.129892"], ["from", "555666"], ["gateway", "simple_http"], ["log", "2015-04-22 14:55:59: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:55:59.129318"], ["to", "555123555"], ["updated_at", "2015-04-22 11:55:59.129892"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:55:59.132615"], ["from", "555666"], ["gateway", "simple_http"], ["log", "2015-04-22 14:55:59: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:55:59.132368"], ["to", "123555123"], ["updated_at", "2015-04-22 11:55:59.132615"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:55:59.137870"], ["from", "555666"], ["gateway", "nexmo"], ["log", "2015-04-22 14:55:59: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:55:59.137617"], ["to", "555123555"], ["updated_at", "2015-04-22 11:55:59.137870"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:55:59.138904"], ["from", "555666"], ["gateway", "nexmo"], ["log", "2015-04-22 14:55:59: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:55:59.138713"], ["to", "123555123"], ["updated_at", "2015-04-22 11:55:59.138904"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:55:59.141451"], ["from", "555666"], ["gateway", "test_array"], ["log", "2015-04-22 14:55:59: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:55:59.141249"], ["to", "123"], ["updated_at", "2015-04-22 11:55:59.141451"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:55:59.143546"], ["from", "555666"], ["gateway", "test_array"], ["log", "2015-04-22 14:55:59: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:55:59.143239"], ["to", "123"], ["updated_at", "2015-04-22 11:55:59.143546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:55:59.144469"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", "t"], ["updated_at", "2015-04-22 11:55:59.147545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:55:59.148882"], ["from", "555666"], ["gateway", "test_array"], ["log", "2015-04-22 14:55:59: LOCAL_SENT\n"], ["msg_id", "test_array_id_15369421"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:55:59.148649"], ["to", "123"], ["updated_at", "2015-04-22 11:55:59.148882"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:55:59.157482"], ["from", "555666"], ["gateway", "test_array"], ["log", "2015-04-22 14:55:59: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:55:59.157160"], ["to", "123"], ["updated_at", "2015-04-22 11:55:59.157482"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-04-22 11:55:59.159293"], ["log", "2015-04-22 14:55:59: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:55:59.159040"], ["updated_at", "2015-04-22 11:55:59.159293"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "log" = ?, "status" = ?, "status_updated_at" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["log", "2015-04-22 14:55:59: LOCAL_TEST\n2015-04-22 14:55:59: TEST_2\n"], ["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:55:59.159906"], ["updated_at", "2015-04-22 11:55:59.160110"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-04-22 11:55:59.162164"], ["log", "2015-04-22 14:55:59: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:55:59.161921"], ["updated_at", "2015-04-22 11:55:59.162164"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "log" = ?, "status" = ?, "status_updated_at" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["log", "2015-04-22 14:55:59: ORIGINAL_STATUS\n2015-04-22 14:55:59: DELIVERED\n"], ["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:55:59.165866"], ["updated_at", "2015-04-22 11:55:59.166225"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-04-22 11:55:59.168778"], ["log", "2015-04-22 14:55:59: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:55:59.168493"], ["updated_at", "2015-04-22 11:55:59.168778"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-04-22 11:55:59.169676"], ["log", "2015-04-22 14:55:59: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:55:59.169492"], ["updated_at", "2015-04-22 11:55:59.169676"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "log" = ?, "status" = ?, "status_updated_at" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["log", "2015-04-22 14:55:59: ORIGINAL_STATUS\n2015-04-22 14:55:59: DELIVERED\n"], ["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:55:59.171670"], ["updated_at", "2015-04-22 11:55:59.171919"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "log" = ?, "status" = ?, "status_updated_at" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["log", "2015-04-22 14:55:59: ORIGINAL_STATUS\n2015-04-22 14:55:59: DELIVERED\n"], ["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:55:59.172750"], ["updated_at", "2015-04-22 11:55:59.172968"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-22 11:55:59.180035"], ["msg_id", "idtest_2"], ["updated_at", "2015-04-22 11:55:59.180035"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-22 11:55:59.180941"], ["msg_id", "idtest_4"], ["updated_at", "2015-04-22 11:55:59.180941"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:55:59.184384' AND '2015-04-22 11:45:59.184486')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:55:59.184384' AND '2015-04-22 11:45:59.184486') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:55:59.184384' AND '2015-04-22 11:45:59.184486')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:55:59.184384' AND '2015-04-22 11:45:59.184486') GROUP BY status  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:55:59.184384' AND '2015-04-22 11:45:59.184486')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:55:59.184384' AND '2015-04-22 11:45:59.184486') GROUP BY sms_type Completed 200 OK in 9ms (Views: 8.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-22 11:55:59.191575"], ["msg_id", "idtest_2"], ["updated_at", "2015-04-22 11:55:59.191575"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-22 11:55:59.192373"], ["msg_id", "idtest_1"], ["updated_at", "2015-04-22 11:55:59.192373"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:55:59.194375' AND '2015-04-22 11:45:59.194451')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:55:59.194375' AND '2015-04-22 11:45:59.194451') GROUP BY gateway  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:55:59.194375' AND '2015-04-22 11:45:59.194451')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:55:59.194375' AND '2015-04-22 11:45:59.194451') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:55:59.194375' AND '2015-04-22 11:45:59.194451')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:55:59.194375' AND '2015-04-22 11:45:59.194451') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-22 11:55:59.202020"], ["msg_id", "idtest_5"], ["updated_at", "2015-04-22 11:55:59.202020"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-22 11:55:59.202800"], ["msg_id", "idtest_3"], ["updated_at", "2015-04-22 11:55:59.202800"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 3ms (Views: 3.1ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", "2015-04-22 11:55:59.211703"], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2015-04-22 14:55:59: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:55:59.211453"], ["to", "4915112341234"], ["updated_at", "2015-04-22 11:55:59.211703"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", "2015-04-22 11:55:59.212852"], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2015-04-22 14:55:59: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:55:59.212548"], ["to", "4917812341234"], ["updated_at", "2015-04-22 11:55:59.212852"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:55:59.222688"], ["from", "555666"], ["gateway", "test_array"], ["log", "2015-04-22 14:55:59: LOCAL_SENT\n"], ["msg_id", "test_array_id_19561602"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:55:59.222431"], ["to", "555123555"], ["updated_at", "2015-04-22 11:55:59.222688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:55:59.223708"], ["from", "555666"], ["gateway", "test_array"], ["log", "2015-04-22 14:55:59: LOCAL_SENT\n"], ["msg_id", "test_array_id_79845151"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:55:59.223502"], ["to", "123555123"], ["updated_at", "2015-04-22 11:55:59.223708"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 14:55:59 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", "2015-04-22 11:56:03.421078"], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2015-04-22 14:56:03: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:56:03.420565"], ["to", "4915112341234"], ["updated_at", "2015-04-22 11:56:03.421078"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ümläüts."], ["created_at", "2015-04-22 11:56:03.423857"], ["from", "4917212341234"], ["gateway", "smstrade"], ["log", "2015-04-22 14:56:03: LOCAL_SENT\n"], ["msg_id", "123456789"], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:56:03.423515"], ["to", "4917812341234"], ["updated_at", "2015-04-22 11:56:03.423857"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-04-22 11:56:03.427206"], ["log", "2015-04-22 14:56:03: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:56:03.426822"], ["updated_at", "2015-04-22 11:56:03.427206"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "log" = ?, "status" = ?, "status_updated_at" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["log", "2015-04-22 14:56:03: ORIGINAL_STATUS\n2015-04-22 14:56:03: DELIVERED\n"], ["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:56:03.431849"], ["updated_at", "2015-04-22 11:56:03.432377"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.4ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-04-22 11:56:03.435664"], ["log", "2015-04-22 14:56:03: ORIGINAL_STATUS\n"], ["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:56:03.435417"], ["updated_at", "2015-04-22 11:56:03.435664"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "msg_id", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-04-22 11:56:03.436613"], ["log", "2015-04-22 14:56:03: ORIGINAL_STATUS\n"], ["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:56:03.436414"], ["updated_at", "2015-04-22 11:56:03.436613"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '102010314204056202' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "log" = ?, "status" = ?, "status_updated_at" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["log", "2015-04-22 14:56:03: ORIGINAL_STATUS\n2015-04-22 14:56:03: DELIVERED\n"], ["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:56:03.438672"], ["updated_at", "2015-04-22 11:56:03.438933"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = '99999999999999999' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "log" = ?, "status" = ?, "status_updated_at" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 2 [["log", "2015-04-22 14:56:03: ORIGINAL_STATUS\n2015-04-22 14:56:03: DELIVERED\n"], ["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:56:03.440076"], ["updated_at", "2015-04-22 11:56:03.440572"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = 'wrongid' ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-22 11:56:03.447966"], ["msg_id", "idtest_1"], ["updated_at", "2015-04-22 11:56:03.447966"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-22 11:56:03.448847"], ["msg_id", "idtest_4"], ["updated_at", "2015-04-22 11:56:03.448847"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:56:03.452904' AND '2015-04-22 11:46:03.453035')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:56:03.452904' AND '2015-04-22 11:46:03.453035') GROUP BY gateway  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:56:03.452904' AND '2015-04-22 11:46:03.453035')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:56:03.452904' AND '2015-04-22 11:46:03.453035') GROUP BY status  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:56:03.452904' AND '2015-04-22 11:46:03.453035')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:56:03.452904' AND '2015-04-22 11:46:03.453035') GROUP BY sms_type Completed 200 OK in 9ms (Views: 8.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-22 11:56:03.460497"], ["msg_id", "idtest_3"], ["updated_at", "2015-04-22 11:56:03.460497"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-22 11:56:03.461437"], ["msg_id", "idtest_9"], ["updated_at", "2015-04-22 11:56:03.461437"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:56:03.463619' AND '2015-04-22 11:46:03.463683')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:56:03.463619' AND '2015-04-22 11:46:03.463683') GROUP BY gateway  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:56:03.463619' AND '2015-04-22 11:46:03.463683')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:56:03.463619' AND '2015-04-22 11:46:03.463683') GROUP BY status  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:56:03.463619' AND '2015-04-22 11:46:03.463683')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:56:03.463619' AND '2015-04-22 11:46:03.463683') GROUP BY sms_type Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-22 11:56:03.471279"], ["msg_id", "idtest_8"], ["updated_at", "2015-04-22 11:56:03.471279"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "msg_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-22 11:56:03.472346"], ["msg_id", "idtest_1"], ["updated_at", "2015-04-22 11:56:03.472346"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:56:03.484093"], ["from", "555666"], ["gateway", "simple_http"], ["log", "2015-04-22 14:56:03: LOCAL_SENT\n"], ["msg_id", "id_1234"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:56:03.483777"], ["to", "555123555"], ["updated_at", "2015-04-22 11:56:03.484093"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:56:03.485164"], ["from", "555666"], ["gateway", "simple_http"], ["log", "2015-04-22 14:56:03: LOCAL_SENT\n"], ["msg_id", "id_6666"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:56:03.484952"], ["to", "123555123"], ["updated_at", "2015-04-22 11:56:03.485164"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:56:03.488593"], ["from", "555666"], ["gateway", "test_array"], ["log", "2015-04-22 14:56:03: LOCAL_SENT\n"], ["msg_id", "test_array_id_42285178"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:56:03.488357"], ["to", "555123555"], ["updated_at", "2015-04-22 11:56:03.488593"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:56:03.489650"], ["from", "555666"], ["gateway", "test_array"], ["log", "2015-04-22 14:56:03: LOCAL_SENT\n"], ["msg_id", "test_array_id_34200406"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:56:03.489418"], ["to", "123555123"], ["updated_at", "2015-04-22 11:56:03.489650"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:56:03.492324"], ["from", "555666"], ["gateway", "test_array"], ["log", "2015-04-22 14:56:03: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:56:03.492090"], ["to", "123"], ["updated_at", "2015-04-22 11:56:03.492324"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:56:03.493883"], ["from", "555666"], ["gateway", "test_array"], ["log", "2015-04-22 14:56:03: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:56:03.493685"], ["to", "123"], ["updated_at", "2015-04-22 11:56:03.493883"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:56:03.494669"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["re_delivered", "t"], ["updated_at", "2015-04-22 11:56:03.495928"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "re_delivery_of_delivery_report_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:56:03.496972"], ["from", "555666"], ["gateway", "test_array"], ["log", "2015-04-22 14:56:03: LOCAL_SENT\n"], ["msg_id", "test_array_id_23909684"], ["re_delivery_of_delivery_report_id", 1], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:56:03.496772"], ["to", "123"], ["updated_at", "2015-04-22 11:56:03.496972"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:56:03.503844"], ["from", "555666"], ["gateway", "test_array"], ["log", "2015-04-22 14:56:03: LOCAL_SENT\n"], ["msg_id", "msg_id_a"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:56:03.503457"], ["to", "123"], ["updated_at", "2015-04-22 11:56:03.503844"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("created_at", "log", "status", "status_updated_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-04-22 11:56:03.505931"], ["log", "2015-04-22 14:56:03: LOCAL_TEST\n"], ["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:56:03.505688"], ["updated_at", "2015-04-22 11:56:03.505931"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "log" = ?, "status" = ?, "status_updated_at" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = 1 [["log", "2015-04-22 14:56:03: LOCAL_TEST\n2015-04-22 14:56:03: TEST_2\n"], ["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:56:03.506723"], ["updated_at", "2015-04-22 11:56:03.506953"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:56:03.519567"], ["from", "555666"], ["gateway", "nexmo"], ["log", "2015-04-22 14:56:03: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:56:03.519297"], ["to", "555123555"], ["updated_at", "2015-04-22 11:56:03.519567"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("body", "created_at", "from", "gateway", "log", "msg_id", "sms_type", "status", "status_updated_at", "to", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Body with ääkköset end"], ["created_at", "2015-04-22 11:56:03.520746"], ["from", "555666"], ["gateway", "nexmo"], ["log", "2015-04-22 14:56:03: LOCAL_SENT\n"], ["msg_id", "0778DE88"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:56:03.520489"], ["to", "123555123"], ["updated_at", "2015-04-22 11:56:03.520746"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 14:56:03 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:57:23.598015"], ["log", "2015-04-22 14:57:23: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:57:23.598658"], ["updated_at", "2015-04-22 11:57:23.598658"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:57:23.605142"], ["log", "2015-04-22 14:57:23: ORIGINAL_STATUS\n2015-04-22 14:57:23: DELIVERED\n"], ["updated_at", "2015-04-22 11:57:23.605649"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.4ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:57:23.609433"], ["log", "2015-04-22 14:57:23: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:57:23.609817"], ["updated_at", "2015-04-22 11:57:23.609817"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:57:23.610861"], ["log", "2015-04-22 14:57:23: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:57:23.611204"], ["updated_at", "2015-04-22 11:57:23.611204"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:57:23.614472"], ["log", "2015-04-22 14:57:23: ORIGINAL_STATUS\n2015-04-22 14:57:23: DELIVERED\n"], ["updated_at", "2015-04-22 11:57:23.615008"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:57:23.616670"], ["log", "2015-04-22 14:57:23: ORIGINAL_STATUS\n2015-04-22 14:57:23: DELIVERED\n"], ["updated_at", "2015-04-22 11:57:23.617031"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:57:23.630321"], ["updated_at", "2015-04-22 11:57:23.630321"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 11:57:23.631501"], ["updated_at", "2015-04-22 11:57:23.631501"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:23.635585' AND '2015-04-22 11:47:23.635713')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:23.635585' AND '2015-04-22 11:47:23.635713') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:23.635585' AND '2015-04-22 11:47:23.635713')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:23.635585' AND '2015-04-22 11:47:23.635713') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:23.635585' AND '2015-04-22 11:47:23.635713')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:23.635585' AND '2015-04-22 11:47:23.635713') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.5ms) Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.4ms)  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:57:23.644434"], ["updated_at", "2015-04-22 11:57:23.644434"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 11:57:23.645799"], ["updated_at", "2015-04-22 11:57:23.645799"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:23.648505' AND '2015-04-22 11:47:23.648583')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:23.648505' AND '2015-04-22 11:47:23.648583') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:23.648505' AND '2015-04-22 11:47:23.648583')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:23.648505' AND '2015-04-22 11:47:23.648583') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:23.648505' AND '2015-04-22 11:47:23.648583')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:23.648505' AND '2015-04-22 11:47:23.648583') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.3ms) Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 11:57:23.656400"], ["updated_at", "2015-04-22 11:57:23.656400"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:57:23.657648"], ["updated_at", "2015-04-22 11:57:23.657648"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (4.3ms) Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:23.670911"], ["log", "2015-04-22 14:57:23: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:57:23.671534"], ["updated_at", "2015-04-22 11:57:23.671534"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:23.673166"], ["log", "2015-04-22 14:57:23: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:57:23.673670"], ["updated_at", "2015-04-22 11:57:23.673670"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 14:57:23 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:23.684589"], ["log", "2015-04-22 14:57:23: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:57:23.684962"], ["updated_at", "2015-04-22 11:57:23.684962"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:23.686168"], ["log", "2015-04-22 14:57:23: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:57:23.686444"], ["updated_at", "2015-04-22 11:57:23.686444"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:23.689377"], ["log", "2015-04-22 14:57:23: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:57:23.689669"], ["updated_at", "2015-04-22 11:57:23.689669"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:23.691284"], ["log", "2015-04-22 14:57:23: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:57:23.691558"], ["updated_at", "2015-04-22 11:57:23.691558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:57:23.692565"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:57:23.694148"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_1619499"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:23.695221"], ["log", "2015-04-22 14:57:23: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:57:23.695509"], ["updated_at", "2015-04-22 11:57:23.695509"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:23.703218"], ["log", "2015-04-22 14:57:23: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:57:23.703743"], ["updated_at", "2015-04-22 11:57:23.703743"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:57:23.705785"], ["log", "2015-04-22 14:57:23: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:57:23.706088"], ["updated_at", "2015-04-22 11:57:23.706088"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:57:23.706903"], ["log", "2015-04-22 14:57:23: LOCAL_TEST\n2015-04-22 14:57:23: TEST_2\n"], ["updated_at", "2015-04-22 11:57:23.707202"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_80120189"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:23.710596"], ["log", "2015-04-22 14:57:23: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:57:23.710916"], ["updated_at", "2015-04-22 11:57:23.710916"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_9160606"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:23.711921"], ["log", "2015-04-22 14:57:23: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:57:23.712192"], ["updated_at", "2015-04-22 11:57:23.712192"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:23.716253"], ["log", "2015-04-22 14:57:23: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:57:23.716576"], ["updated_at", "2015-04-22 11:57:23.716576"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:23.717542"], ["log", "2015-04-22 14:57:23: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:57:23.717821"], ["updated_at", "2015-04-22 11:57:23.717821"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:57:56.347308"], ["log", "2015-04-22 14:57:56: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:57:56.347826"], ["updated_at", "2015-04-22 11:57:56.347826"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:57:56.354876"], ["log", "2015-04-22 14:57:56: ORIGINAL_STATUS\n2015-04-22 14:57:56: DELIVERED\n"], ["updated_at", "2015-04-22 11:57:56.355484"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:57:56.361530"], ["updated_at", "2015-04-22 11:57:56.361530"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:57:56.362659"], ["updated_at", "2015-04-22 11:57:56.362659"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (5.0ms) Completed 200 OK in 7ms (Views: 6.8ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:57:56.375217"], ["log", "2015-04-22 14:57:56: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:57:56.375625"], ["updated_at", "2015-04-22 11:57:56.375625"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 11:57:56.376712"], ["log", "2015-04-22 14:57:56: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 11:57:56.377018"], ["updated_at", "2015-04-22 11:57:56.377018"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:57:56.380132"], ["log", "2015-04-22 14:57:56: ORIGINAL_STATUS\n2015-04-22 14:57:56: DELIVERED\n"], ["updated_at", "2015-04-22 11:57:56.380506"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 11:57:56.381821"], ["log", "2015-04-22 14:57:56: ORIGINAL_STATUS\n2015-04-22 14:57:56: DELIVERED\n"], ["updated_at", "2015-04-22 11:57:56.387271"], ["id", 2]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 9ms (Views: 0.2ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 11:57:56.392542"], ["updated_at", "2015-04-22 11:57:56.392542"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:57:56.393617"], ["updated_at", "2015-04-22 11:57:56.393617"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:56.397768' AND '2015-04-22 11:47:56.397948')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:56.397768' AND '2015-04-22 11:47:56.397948') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:56.397768' AND '2015-04-22 11:47:56.397948')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:56.397768' AND '2015-04-22 11:47:56.397948') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:56.397768' AND '2015-04-22 11:47:56.397948')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:56.397768' AND '2015-04-22 11:47:56.397948') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (9.9ms) Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 11:57:56.408151"], ["updated_at", "2015-04-22 11:57:56.408151"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 11:57:56.409273"], ["updated_at", "2015-04-22 11:57:56.409273"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:56.411606' AND '2015-04-22 11:47:56.411676')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:56.411606' AND '2015-04-22 11:47:56.411676') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:56.411606' AND '2015-04-22 11:47:56.411676')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:56.411606' AND '2015-04-22 11:47:56.411676') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:56.411606' AND '2015-04-22 11:47:56.411676')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 11:57:56.411606' AND '2015-04-22 11:47:56.411676') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.4ms) Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 14:57:56 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:56.433446"], ["log", "2015-04-22 14:57:56: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:57:56.433853"], ["updated_at", "2015-04-22 11:57:56.433853"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:56.435131"], ["log", "2015-04-22 14:57:56: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 11:57:56.435469"], ["updated_at", "2015-04-22 11:57:56.435469"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:56.440743"], ["log", "2015-04-22 14:57:56: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:57:56.441165"], ["updated_at", "2015-04-22 11:57:56.441165"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:56.442589"], ["log", "2015-04-22 14:57:56: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 11:57:56.442982"], ["updated_at", "2015-04-22 11:57:56.442982"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:56.450621"], ["log", "2015-04-22 14:57:56: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:57:56.451050"], ["updated_at", "2015-04-22 11:57:56.451050"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:56.452279"], ["log", "2015-04-22 14:57:56: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 11:57:56.452594"], ["updated_at", "2015-04-22 11:57:56.452594"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:56.456083"], ["log", "2015-04-22 14:57:56: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:57:56.456392"], ["updated_at", "2015-04-22 11:57:56.456392"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:56.458119"], ["log", "2015-04-22 14:57:56: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:57:56.458407"], ["updated_at", "2015-04-22 11:57:56.458407"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 11:57:56.459835"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 11:57:56.461784"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_51852811"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:56.463127"], ["log", "2015-04-22 14:57:56: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:57:56.463491"], ["updated_at", "2015-04-22 11:57:56.463491"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 11:57:56.471820"], ["log", "2015-04-22 14:57:56: LOCAL_TEST\n"], ["created_at", "2015-04-22 11:57:56.472217"], ["updated_at", "2015-04-22 11:57:56.472217"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 11:57:56.473234"], ["log", "2015-04-22 14:57:56: LOCAL_TEST\n2015-04-22 14:57:56: TEST_2\n"], ["updated_at", "2015-04-22 11:57:56.473564"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:56.475716"], ["log", "2015-04-22 14:57:56: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:57:56.476003"], ["updated_at", "2015-04-22 11:57:56.476003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_60172568"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:56.479393"], ["log", "2015-04-22 14:57:56: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:57:56.479717"], ["updated_at", "2015-04-22 11:57:56.479717"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_45023706"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 11:57:56.480796"], ["log", "2015-04-22 14:57:56: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 11:57:56.481123"], ["updated_at", "2015-04-22 11:57:56.481123"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_93369828"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:00:41.159196"], ["log", "2015-04-22 15:00:41: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:00:41.159742"], ["updated_at", "2015-04-22 12:00:41.159742"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_7710396"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:00:41.162992"], ["log", "2015-04-22 15:00:41: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:00:41.163395"], ["updated_at", "2015-04-22 12:00:41.163395"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:00:41.168010"], ["log", "2015-04-22 15:00:41: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:00:41.168371"], ["updated_at", "2015-04-22 12:00:41.168371"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:00:41.169461"], ["log", "2015-04-22 15:00:41: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:00:41.169748"], ["updated_at", "2015-04-22 12:00:41.169748"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:00:41 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:00:41.180050"], ["log", "2015-04-22 15:00:41: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:00:41.180513"], ["updated_at", "2015-04-22 12:00:41.180513"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:00:41.181904"], ["log", "2015-04-22 15:00:41: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:00:41.182235"], ["updated_at", "2015-04-22 12:00:41.182235"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:00:41.195386"], ["log", "2015-04-22 15:00:41: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:00:41.195932"], ["updated_at", "2015-04-22 12:00:41.195932"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:00:41.197354"], ["log", "2015-04-22 15:00:41: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:00:41.197732"], ["updated_at", "2015-04-22 12:00:41.197732"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 12:00:41.206311"], ["updated_at", "2015-04-22 12:00:41.206311"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 12:00:41.207532"], ["updated_at", "2015-04-22 12:00:41.207532"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:00:41.212064' AND '2015-04-22 11:50:41.212234')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:00:41.212064' AND '2015-04-22 11:50:41.212234') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:00:41.212064' AND '2015-04-22 11:50:41.212234')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:00:41.212064' AND '2015-04-22 11:50:41.212234') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:00:41.212064' AND '2015-04-22 11:50:41.212234')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:00:41.212064' AND '2015-04-22 11:50:41.212234') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (8.9ms) Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:00:41.220731"], ["log", "2015-04-22 15:00:41: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:00:41.221118"], ["updated_at", "2015-04-22 12:00:41.221118"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:00:41.223963"], ["log", "2015-04-22 15:00:41: ORIGINAL_STATUS\n2015-04-22 15:00:41: DELIVERED\n"], ["updated_at", "2015-04-22 12:00:41.224390"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.2ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:00:41.227577"], ["log", "2015-04-22 15:00:41: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:00:41.227901"], ["updated_at", "2015-04-22 12:00:41.227901"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:00:41.228867"], ["log", "2015-04-22 15:00:41: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:00:41.229155"], ["updated_at", "2015-04-22 12:00:41.229155"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:00:41.231259"], ["log", "2015-04-22 15:00:41: ORIGINAL_STATUS\n2015-04-22 15:00:41: DELIVERED\n"], ["updated_at", "2015-04-22 12:00:41.231611"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:00:41.232742"], ["log", "2015-04-22 15:00:41: ORIGINAL_STATUS\n2015-04-22 15:00:41: DELIVERED\n"], ["updated_at", "2015-04-22 12:00:41.233176"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 12:00:41.236045"], ["updated_at", "2015-04-22 12:00:41.236045"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 12:00:41.237031"], ["updated_at", "2015-04-22 12:00:41.237031"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:00:41.239621' AND '2015-04-22 11:50:41.239722')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:00:41.239621' AND '2015-04-22 11:50:41.239722') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:00:41.239621' AND '2015-04-22 11:50:41.239722')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:00:41.239621' AND '2015-04-22 11:50:41.239722') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:00:41.239621' AND '2015-04-22 11:50:41.239722')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:00:41.239621' AND '2015-04-22 11:50:41.239722') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (5.8ms) Completed 200 OK in 7ms (Views: 5.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 12:00:41.247337"], ["updated_at", "2015-04-22 12:00:41.247337"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 12:00:41.248469"], ["updated_at", "2015-04-22 12:00:41.248469"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (4.0ms) Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:00:41.261216"], ["log", "2015-04-22 15:00:41: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:00:41.261519"], ["updated_at", "2015-04-22 12:00:41.261519"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:00:41.262831"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:00:41.264430"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_21399534"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:00:41.265462"], ["log", "2015-04-22 15:00:41: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:00:41.265762"], ["updated_at", "2015-04-22 12:00:41.265762"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:00:41.273608"], ["log", "2015-04-22 15:00:41: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:00:41.274015"], ["updated_at", "2015-04-22 12:00:41.274015"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:00:41.275995"], ["log", "2015-04-22 15:00:41: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:00:41.276293"], ["updated_at", "2015-04-22 12:00:41.276293"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:00:41.277967"], ["log", "2015-04-22 15:00:41: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:00:41.278283"], ["updated_at", "2015-04-22 12:00:41.278283"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:00:41.279191"], ["log", "2015-04-22 15:00:41: LOCAL_TEST\n2015-04-22 15:00:41: TEST_2\n"], ["updated_at", "2015-04-22 12:00:41.279469"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:03:20.046668"], ["log", "2015-04-22 15:03:20: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:03:20.047258"], ["updated_at", "2015-04-22 12:03:20.047258"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:03:20.050543"], ["log", "2015-04-22 15:03:20: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:03:20.050911"], ["updated_at", "2015-04-22 12:03:20.050911"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:03:20.054880"], ["log", "2015-04-22 15:03:20: ORIGINAL_STATUS\n2015-04-22 15:03:20: DELIVERED\n"], ["updated_at", "2015-04-22 12:03:20.055416"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:03:20.057127"], ["log", "2015-04-22 15:03:20: ORIGINAL_STATUS\n2015-04-22 15:03:20: DELIVERED\n"], ["updated_at", "2015-04-22 12:03:20.057457"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 12:03:20.062619"], ["updated_at", "2015-04-22 12:03:20.062619"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 12:03:20.064023"], ["updated_at", "2015-04-22 12:03:20.064023"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:03:20.068870' AND '2015-04-22 11:53:20.069002')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:03:20.068870' AND '2015-04-22 11:53:20.069002') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:03:20.068870' AND '2015-04-22 11:53:20.069002')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:03:20.068870' AND '2015-04-22 11:53:20.069002') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:03:20.068870' AND '2015-04-22 11:53:20.069002')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:03:20.068870' AND '2015-04-22 11:53:20.069002') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (8.5ms) Completed 200 OK in 16ms (Views: 15.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 12:03:20.083812"], ["updated_at", "2015-04-22 12:03:20.083812"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 12:03:20.084968"], ["updated_at", "2015-04-22 12:03:20.084968"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:03:20.087500' AND '2015-04-22 11:53:20.087579')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:03:20.087500' AND '2015-04-22 11:53:20.087579') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:03:20.087500' AND '2015-04-22 11:53:20.087579')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:03:20.087500' AND '2015-04-22 11:53:20.087579') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:03:20.087500' AND '2015-04-22 11:53:20.087579')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:03:20.087500' AND '2015-04-22 11:53:20.087579') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.2ms) Completed 200 OK in 5ms (Views: 4.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:03:20.092935"], ["log", "2015-04-22 15:03:20: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:03:20.093397"], ["updated_at", "2015-04-22 12:03:20.093397"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:03:20.096819"], ["log", "2015-04-22 15:03:20: ORIGINAL_STATUS\n2015-04-22 15:03:20: DELIVERED\n"], ["updated_at", "2015-04-22 12:03:20.097268"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 12:03:20.100638"], ["updated_at", "2015-04-22 12:03:20.100638"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 12:03:20.101744"], ["updated_at", "2015-04-22 12:03:20.101744"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (3.9ms) Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:03:20.115722"], ["log", "2015-04-22 15:03:20: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:03:20.116101"], ["updated_at", "2015-04-22 12:03:20.116101"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:03:20.117287"], ["log", "2015-04-22 15:03:20: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:03:20.117615"], ["updated_at", "2015-04-22 12:03:20.117615"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:03:20 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:03:20.125408"], ["log", "2015-04-22 15:03:20: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:03:20.125771"], ["updated_at", "2015-04-22 12:03:20.125771"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:03:20.127466"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:03:20.129598"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_59550947"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:03:20.130996"], ["log", "2015-04-22 15:03:20: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:03:20.131397"], ["updated_at", "2015-04-22 12:03:20.131397"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:03:20.139328"], ["log", "2015-04-22 15:03:20: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:03:20.139690"], ["updated_at", "2015-04-22 12:03:20.139690"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:03:20.140603"], ["log", "2015-04-22 15:03:20: LOCAL_TEST\n2015-04-22 15:03:20: TEST_2\n"], ["updated_at", "2015-04-22 12:03:20.140929"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:03:20.142592"], ["log", "2015-04-22 15:03:20: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:03:20.142924"], ["updated_at", "2015-04-22 12:03:20.142924"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:03:20.144902"], ["log", "2015-04-22 15:03:20: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:03:20.145221"], ["updated_at", "2015-04-22 12:03:20.145221"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:03:20.158945"], ["log", "2015-04-22 15:03:20: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:03:20.159565"], ["updated_at", "2015-04-22 12:03:20.159565"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:03:20.160838"], ["log", "2015-04-22 15:03:20: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:03:20.161142"], ["updated_at", "2015-04-22 12:03:20.161142"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_78056595"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:03:20.164804"], ["log", "2015-04-22 15:03:20: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:03:20.165313"], ["updated_at", "2015-04-22 12:03:20.165313"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_70297849"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:03:20.166598"], ["log", "2015-04-22 15:03:20: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:03:20.166906"], ["updated_at", "2015-04-22 12:03:20.166906"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:03:20.171247"], ["log", "2015-04-22 15:03:20: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:03:20.171578"], ["updated_at", "2015-04-22 12:03:20.171578"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:03:20.172683"], ["log", "2015-04-22 15:03:20: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:03:20.172988"], ["updated_at", "2015-04-22 12:03:20.172988"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_96995655"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.450577"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:05.451687"], ["updated_at", "2015-04-22 12:04:05.451687"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_94117371"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.455941"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:05.456515"], ["updated_at", "2015-04-22 12:04:05.456515"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.462370"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:04:05.462713"], ["updated_at", "2015-04-22 12:04:05.462713"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.463960"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:04:05.464346"], ["updated_at", "2015-04-22 12:04:05.464346"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.469438"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:04:05.469800"], ["updated_at", "2015-04-22 12:04:05.469800"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.470951"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:04:05.471312"], ["updated_at", "2015-04-22 12:04:05.471312"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:04:05 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.488993"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:04:05.489437"], ["updated_at", "2015-04-22 12:04:05.489437"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.490592"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:04:05.490897"], ["updated_at", "2015-04-22 12:04:05.490897"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 12:04:05.499091"], ["updated_at", "2015-04-22 12:04:05.499091"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 12:04:05.500570"], ["updated_at", "2015-04-22 12:04:05.500570"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:05.504514' AND '2015-04-22 11:54:05.504626')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:05.504514' AND '2015-04-22 11:54:05.504626') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:05.504514' AND '2015-04-22 11:54:05.504626')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:05.504514' AND '2015-04-22 11:54:05.504626') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:05.504514' AND '2015-04-22 11:54:05.504626')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:05.504514' AND '2015-04-22 11:54:05.504626') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.5ms) Completed 200 OK in 9ms (Views: 8.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 12:04:05.516122"], ["updated_at", "2015-04-22 12:04:05.516122"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 12:04:05.517210"], ["updated_at", "2015-04-22 12:04:05.517210"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (4.1ms) Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:04:05.525663"], ["log", "2015-04-22 15:04:05: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:04:05.526020"], ["updated_at", "2015-04-22 12:04:05.526020"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:04:05.527463"], ["log", "2015-04-22 15:04:05: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:04:05.527820"], ["updated_at", "2015-04-22 12:04:05.527820"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:04:05.531371"], ["log", "2015-04-22 15:04:05: ORIGINAL_STATUS\n2015-04-22 15:04:05: DELIVERED\n"], ["updated_at", "2015-04-22 12:04:05.531861"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:04:05.534073"], ["log", "2015-04-22 15:04:05: ORIGINAL_STATUS\n2015-04-22 15:04:05: DELIVERED\n"], ["updated_at", "2015-04-22 12:04:05.534510"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:04:05.539036"], ["log", "2015-04-22 15:04:05: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:04:05.539400"], ["updated_at", "2015-04-22 12:04:05.539400"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:04:05.541980"], ["log", "2015-04-22 15:04:05: ORIGINAL_STATUS\n2015-04-22 15:04:05: DELIVERED\n"], ["updated_at", "2015-04-22 12:04:05.542368"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 12:04:05.544940"], ["updated_at", "2015-04-22 12:04:05.544940"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 12:04:05.546049"], ["updated_at", "2015-04-22 12:04:05.546049"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:05.548545' AND '2015-04-22 11:54:05.548611')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:05.548545' AND '2015-04-22 11:54:05.548611') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:05.548545' AND '2015-04-22 11:54:05.548611')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:05.548545' AND '2015-04-22 11:54:05.548611') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:05.548545' AND '2015-04-22 11:54:05.548611')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:05.548545' AND '2015-04-22 11:54:05.548611') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.5ms) Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.555254"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:05.555603"], ["updated_at", "2015-04-22 12:04:05.555603"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:04:05.557632"], ["log", "2015-04-22 15:04:05: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:04:05.558134"], ["updated_at", "2015-04-22 12:04:05.558134"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:04:05.559089"], ["log", "2015-04-22 15:04:05: LOCAL_TEST\n2015-04-22 15:04:05: TEST_2\n"], ["updated_at", "2015-04-22 12:04:05.559467"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.561977"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:05.562345"], ["updated_at", "2015-04-22 12:04:05.562345"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.564724"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:05.565059"], ["updated_at", "2015-04-22 12:04:05.565059"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:04:05.566204"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:04:05.567529"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_69295175"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.568603"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:05.568975"], ["updated_at", "2015-04-22 12:04:05.568975"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::BaseTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_75169060"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.576928"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:05.577312"], ["updated_at", "2015-04-22 12:04:05.577312"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::BaseTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "test_array_id_31741655"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.578389"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:05.578681"], ["updated_at", "2015-04-22 12:04:05.578681"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::BaseTest::MockSms.basic_sms"], ["to", "358123555123"], ["msg_id", "test_array_id_59249760"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.579714"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:05.580049"], ["updated_at", "2015-04-22 12:04:05.580049"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::BaseTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_9682771"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.582734"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:05.583038"], ["updated_at", "2015-04-22 12:04:05.583038"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::BaseTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "test_array_id_26136234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.584054"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:05.584338"], ["updated_at", "2015-04-22 12:04:05.584338"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::BaseTest::MockSms.basic_sms"], ["to", "358123555123"], ["msg_id", "test_array_id_61296602"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:05.585341"], ["log", "2015-04-22 15:04:05: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:05.585618"], ["updated_at", "2015-04-22 12:04:05.585618"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:04:30 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:04:30.524345"], ["log", "2015-04-22 15:04:30: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:04:30.525102"], ["updated_at", "2015-04-22 12:04:30.525102"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:04:30.531341"], ["log", "2015-04-22 15:04:30: ORIGINAL_STATUS\n2015-04-22 15:04:30: DELIVERED\n"], ["updated_at", "2015-04-22 12:04:30.531832"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 12:04:30.537935"], ["updated_at", "2015-04-22 12:04:30.537935"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 12:04:30.539188"], ["updated_at", "2015-04-22 12:04:30.539188"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:30.543717' AND '2015-04-22 11:54:30.543841')  (0.2ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:30.543717' AND '2015-04-22 11:54:30.543841') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:30.543717' AND '2015-04-22 11:54:30.543841')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:30.543717' AND '2015-04-22 11:54:30.543841') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:30.543717' AND '2015-04-22 11:54:30.543841')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:30.543717' AND '2015-04-22 11:54:30.543841') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (14.2ms) Completed 200 OK in 16ms (Views: 15.5ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:04:30.558416"], ["log", "2015-04-22 15:04:30: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:04:30.558834"], ["updated_at", "2015-04-22 12:04:30.558834"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:04:30.559916"], ["log", "2015-04-22 15:04:30: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:04:30.560207"], ["updated_at", "2015-04-22 12:04:30.560207"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:04:30.562405"], ["log", "2015-04-22 15:04:30: ORIGINAL_STATUS\n2015-04-22 15:04:30: DELIVERED\n"], ["updated_at", "2015-04-22 12:04:30.562776"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:04:30.563907"], ["log", "2015-04-22 15:04:30: ORIGINAL_STATUS\n2015-04-22 15:04:30: DELIVERED\n"], ["updated_at", "2015-04-22 12:04:30.564199"], ["id", 2]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 12:04:30.569362"], ["updated_at", "2015-04-22 12:04:30.569362"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 12:04:30.570597"], ["updated_at", "2015-04-22 12:04:30.570597"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (4.4ms) Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 12:04:30.579882"], ["updated_at", "2015-04-22 12:04:30.579882"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 12:04:30.580945"], ["updated_at", "2015-04-22 12:04:30.580945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:30.583304' AND '2015-04-22 11:54:30.583369')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:30.583304' AND '2015-04-22 11:54:30.583369') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:30.583304' AND '2015-04-22 11:54:30.583369')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:30.583304' AND '2015-04-22 11:54:30.583369') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:30.583304' AND '2015-04-22 11:54:30.583369')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:30.583304' AND '2015-04-22 11:54:30.583369') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.4ms) Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_62538306"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:30.599073"], ["log", "2015-04-22 15:04:30: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:30.599528"], ["updated_at", "2015-04-22 12:04:30.599528"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_99465366"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:30.600841"], ["log", "2015-04-22 15:04:30: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:30.601161"], ["updated_at", "2015-04-22 12:04:30.601161"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:30.605121"], ["log", "2015-04-22 15:04:30: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:30.605455"], ["updated_at", "2015-04-22 12:04:30.605455"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:04:30.607242"], ["log", "2015-04-22 15:04:30: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:04:30.607527"], ["updated_at", "2015-04-22 12:04:30.607527"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:04:30.608344"], ["log", "2015-04-22 15:04:30: LOCAL_TEST\n2015-04-22 15:04:30: TEST_2\n"], ["updated_at", "2015-04-22 12:04:30.608594"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:30.609901"], ["log", "2015-04-22 15:04:30: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:30.610172"], ["updated_at", "2015-04-22 12:04:30.610172"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:04:30.611244"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:04:30.612725"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_32748619"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:30.613719"], ["log", "2015-04-22 15:04:30: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:30.614005"], ["updated_at", "2015-04-22 12:04:30.614005"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:30.621305"], ["log", "2015-04-22 15:04:30: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:30.621663"], ["updated_at", "2015-04-22 12:04:30.621663"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:30.627433"], ["log", "2015-04-22 15:04:30: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:04:30.627772"], ["updated_at", "2015-04-22 12:04:30.627772"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:30.628874"], ["log", "2015-04-22 15:04:30: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:04:30.629156"], ["updated_at", "2015-04-22 12:04:30.629156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:30.634484"], ["log", "2015-04-22 15:04:30: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:04:30.634851"], ["updated_at", "2015-04-22 12:04:30.634851"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:30.636079"], ["log", "2015-04-22 15:04:30: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:04:30.636424"], ["updated_at", "2015-04-22 12:04:30.636424"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:30.640262"], ["log", "2015-04-22 15:04:30: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:04:30.640564"], ["updated_at", "2015-04-22 12:04:30.640564"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:30.641678"], ["log", "2015-04-22 15:04:30: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:04:30.641940"], ["updated_at", "2015-04-22 12:04:30.641940"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:37.348317"], ["log", "2015-04-22 15:04:37: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:04:37.348839"], ["updated_at", "2015-04-22 12:04:37.348839"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:37.352357"], ["log", "2015-04-22 15:04:37: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:04:37.352900"], ["updated_at", "2015-04-22 12:04:37.352900"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:37.358664"], ["log", "2015-04-22 15:04:37: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:04:37.359052"], ["updated_at", "2015-04-22 12:04:37.359052"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:37.360345"], ["log", "2015-04-22 15:04:37: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:04:37.360670"], ["updated_at", "2015-04-22 12:04:37.360670"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:37.367966"], ["log", "2015-04-22 15:04:37: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:04:37.368533"], ["updated_at", "2015-04-22 12:04:37.368533"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:37.370258"], ["log", "2015-04-22 15:04:37: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:04:37.370655"], ["updated_at", "2015-04-22 12:04:37.370655"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (5.7ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:04:37.389395"], ["log", "2015-04-22 15:04:37: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:04:37.389795"], ["updated_at", "2015-04-22 12:04:37.389795"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:04:37.395270"], ["log", "2015-04-22 15:04:37: ORIGINAL_STATUS\n2015-04-22 15:04:37: DELIVERED\n"], ["updated_at", "2015-04-22 12:04:37.395856"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 12:04:37.400976"], ["updated_at", "2015-04-22 12:04:37.400976"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 12:04:37.402453"], ["updated_at", "2015-04-22 12:04:37.402453"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (4.4ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:04:37.415257"], ["log", "2015-04-22 15:04:37: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:04:37.415651"], ["updated_at", "2015-04-22 12:04:37.415651"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:04:37.416650"], ["log", "2015-04-22 15:04:37: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:04:37.416963"], ["updated_at", "2015-04-22 12:04:37.416963"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:04:37.419068"], ["log", "2015-04-22 15:04:37: ORIGINAL_STATUS\n2015-04-22 15:04:37: DELIVERED\n"], ["updated_at", "2015-04-22 12:04:37.419437"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:04:37.420696"], ["log", "2015-04-22 15:04:37: ORIGINAL_STATUS\n2015-04-22 15:04:37: DELIVERED\n"], ["updated_at", "2015-04-22 12:04:37.421020"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 12:04:37.425329"], ["updated_at", "2015-04-22 12:04:37.425329"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 12:04:37.426354"], ["updated_at", "2015-04-22 12:04:37.426354"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:37.430621' AND '2015-04-22 11:54:37.430782')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:37.430621' AND '2015-04-22 11:54:37.430782') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:37.430621' AND '2015-04-22 11:54:37.430782')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:37.430621' AND '2015-04-22 11:54:37.430782') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:37.430621' AND '2015-04-22 11:54:37.430782')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:37.430621' AND '2015-04-22 11:54:37.430782') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (9.3ms) Completed 200 OK in 10ms (Views: 9.7ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 12:04:37.440238"], ["updated_at", "2015-04-22 12:04:37.440238"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 12:04:37.442320"], ["updated_at", "2015-04-22 12:04:37.442320"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:37.446587' AND '2015-04-22 11:54:37.446701')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:37.446587' AND '2015-04-22 11:54:37.446701') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:37.446587' AND '2015-04-22 11:54:37.446701')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:37.446587' AND '2015-04-22 11:54:37.446701') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:37.446587' AND '2015-04-22 11:54:37.446701')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:37.446587' AND '2015-04-22 11:54:37.446701') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (5.7ms) Completed 200 OK in 7ms (Views: 5.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:37.455947"], ["log", "2015-04-22 15:04:37: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:37.456321"], ["updated_at", "2015-04-22 12:04:37.456321"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:04:37.457670"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:04:37.460140"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_1164034"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:37.461594"], ["log", "2015-04-22 15:04:37: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:37.461960"], ["updated_at", "2015-04-22 12:04:37.461960"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:37.470171"], ["log", "2015-04-22 15:04:37: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:37.470575"], ["updated_at", "2015-04-22 12:04:37.470575"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:04:37.472987"], ["log", "2015-04-22 15:04:37: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:04:37.473266"], ["updated_at", "2015-04-22 12:04:37.473266"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:04:37.474228"], ["log", "2015-04-22 15:04:37: LOCAL_TEST\n2015-04-22 15:04:37: TEST_2\n"], ["updated_at", "2015-04-22 12:04:37.474518"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:37.475924"], ["log", "2015-04-22 15:04:37: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:37.476259"], ["updated_at", "2015-04-22 12:04:37.476259"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:04:37 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_45148988"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:37.484900"], ["log", "2015-04-22 15:04:37: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:37.485297"], ["updated_at", "2015-04-22 12:04:37.485297"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_92346557"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:37.486474"], ["log", "2015-04-22 15:04:37: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:37.486805"], ["updated_at", "2015-04-22 12:04:37.486805"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:44.358246"], ["log", "2015-04-22 15:04:44: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:04:44.358749"], ["updated_at", "2015-04-22 12:04:44.358749"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:44.362002"], ["log", "2015-04-22 15:04:44: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:04:44.362383"], ["updated_at", "2015-04-22 12:04:44.362383"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:44.369579"], ["log", "2015-04-22 15:04:44: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:04:44.369922"], ["updated_at", "2015-04-22 12:04:44.369922"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:44.371116"], ["log", "2015-04-22 15:04:44: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:04:44.371477"], ["updated_at", "2015-04-22 12:04:44.371477"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_85720012"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:44.375609"], ["log", "2015-04-22 15:04:44: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:44.376258"], ["updated_at", "2015-04-22 12:04:44.376258"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_92851147"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:44.377697"], ["log", "2015-04-22 15:04:44: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:44.378095"], ["updated_at", "2015-04-22 12:04:44.378095"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:44.381667"], ["log", "2015-04-22 15:04:44: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:44.382051"], ["updated_at", "2015-04-22 12:04:44.382051"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:04:44.383381"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:04:44.387920"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_63660152"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:44.389480"], ["log", "2015-04-22 15:04:44: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:44.389881"], ["updated_at", "2015-04-22 12:04:44.389881"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:44.406172"], ["log", "2015-04-22 15:04:44: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:44.406576"], ["updated_at", "2015-04-22 12:04:44.406576"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:44.409139"], ["log", "2015-04-22 15:04:44: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:04:44.409488"], ["updated_at", "2015-04-22 12:04:44.409488"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:04:44.411304"], ["log", "2015-04-22 15:04:44: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:04:44.411618"], ["updated_at", "2015-04-22 12:04:44.411618"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:04:44.412453"], ["log", "2015-04-22 15:04:44: LOCAL_TEST\n2015-04-22 15:04:44: TEST_2\n"], ["updated_at", "2015-04-22 12:04:44.412745"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 12:04:44.416489"], ["updated_at", "2015-04-22 12:04:44.416489"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 12:04:44.417598"], ["updated_at", "2015-04-22 12:04:44.417598"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:44.422783' AND '2015-04-22 11:54:44.422902')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:44.422783' AND '2015-04-22 11:54:44.422902') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:44.422783' AND '2015-04-22 11:54:44.422902')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:44.422783' AND '2015-04-22 11:54:44.422902') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:44.422783' AND '2015-04-22 11:54:44.422902')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:44.422783' AND '2015-04-22 11:54:44.422902') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.4ms) Completed 200 OK in 9ms (Views: 8.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:04:44.433548"], ["log", "2015-04-22 15:04:44: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:04:44.433918"], ["updated_at", "2015-04-22 12:04:44.433918"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:04:44.436562"], ["log", "2015-04-22 15:04:44: ORIGINAL_STATUS\n2015-04-22 15:04:44: DELIVERED\n"], ["updated_at", "2015-04-22 12:04:44.436979"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:04:44.440375"], ["log", "2015-04-22 15:04:44: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:04:44.440876"], ["updated_at", "2015-04-22 12:04:44.440876"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:04:44.442180"], ["log", "2015-04-22 15:04:44: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:04:44.442632"], ["updated_at", "2015-04-22 12:04:44.442632"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:04:44.446018"], ["log", "2015-04-22 15:04:44: ORIGINAL_STATUS\n2015-04-22 15:04:44: DELIVERED\n"], ["updated_at", "2015-04-22 12:04:44.446567"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:04:44.448114"], ["log", "2015-04-22 15:04:44: ORIGINAL_STATUS\n2015-04-22 15:04:44: DELIVERED\n"], ["updated_at", "2015-04-22 12:04:44.448571"], ["id", 2]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 12:04:44.451983"], ["updated_at", "2015-04-22 12:04:44.451983"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 12:04:44.453140"], ["updated_at", "2015-04-22 12:04:44.453140"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:44.455845' AND '2015-04-22 11:54:44.455920')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:44.455845' AND '2015-04-22 11:54:44.455920') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:44.455845' AND '2015-04-22 11:54:44.455920')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:44.455845' AND '2015-04-22 11:54:44.455920') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:44.455845' AND '2015-04-22 11:54:44.455920')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:04:44.455845' AND '2015-04-22 11:54:44.455920') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.5ms) Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 12:04:44.463994"], ["updated_at", "2015-04-22 12:04:44.463994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 12:04:44.465150"], ["updated_at", "2015-04-22 12:04:44.465150"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (3.0ms) Completed 200 OK in 4ms (Views: 4.0ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:44.477015"], ["log", "2015-04-22 15:04:44: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:04:44.477390"], ["updated_at", "2015-04-22 12:04:44.477390"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:04:44.478673"], ["log", "2015-04-22 15:04:44: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:04:44.478983"], ["updated_at", "2015-04-22 12:04:44.478983"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:04:44 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:08.750908"], ["log", "2015-04-22 15:05:08: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:05:08.751476"], ["updated_at", "2015-04-22 12:05:08.751476"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:08.754774"], ["log", "2015-04-22 15:05:08: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:05:08.755136"], ["updated_at", "2015-04-22 12:05:08.755136"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:08.760932"], ["log", "2015-04-22 15:05:08: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:05:08.761288"], ["updated_at", "2015-04-22 12:05:08.761288"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:08.762412"], ["log", "2015-04-22 15:05:08: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:05:08.762689"], ["updated_at", "2015-04-22 12:05:08.762689"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 12:05:08.770772"], ["updated_at", "2015-04-22 12:05:08.770772"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 12:05:08.772153"], ["updated_at", "2015-04-22 12:05:08.772153"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:08.776438' AND '2015-04-22 11:55:08.776558')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:08.776438' AND '2015-04-22 11:55:08.776558') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:08.776438' AND '2015-04-22 11:55:08.776558')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:08.776438' AND '2015-04-22 11:55:08.776558') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:08.776438' AND '2015-04-22 11:55:08.776558')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:08.776438' AND '2015-04-22 11:55:08.776558') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (14.4ms) Completed 200 OK in 16ms (Views: 15.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 12:05:08.791450"], ["updated_at", "2015-04-22 12:05:08.791450"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 12:05:08.792500"], ["updated_at", "2015-04-22 12:05:08.792500"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (4.3ms) Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.2ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:05:08.801582"], ["log", "2015-04-22 15:05:08: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:05:08.802010"], ["updated_at", "2015-04-22 12:05:08.802010"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:05:08.805597"], ["log", "2015-04-22 15:05:08: ORIGINAL_STATUS\n2015-04-22 15:05:08: DELIVERED\n"], ["updated_at", "2015-04-22 12:05:08.806029"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 12:05:08.811590"], ["updated_at", "2015-04-22 12:05:08.811590"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 12:05:08.812642"], ["updated_at", "2015-04-22 12:05:08.812642"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:08.814829' AND '2015-04-22 11:55:08.814895')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:08.814829' AND '2015-04-22 11:55:08.814895') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:08.814829' AND '2015-04-22 11:55:08.814895')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:08.814829' AND '2015-04-22 11:55:08.814895') GROUP BY "action_smser_delivery_reports"."status"  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:08.814829' AND '2015-04-22 11:55:08.814895')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:08.814829' AND '2015-04-22 11:55:08.814895') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.3ms) Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:05:08.820404"], ["log", "2015-04-22 15:05:08: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:05:08.820776"], ["updated_at", "2015-04-22 12:05:08.820776"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:05:08.821722"], ["log", "2015-04-22 15:05:08: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:05:08.821995"], ["updated_at", "2015-04-22 12:05:08.821995"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:05:08.824400"], ["log", "2015-04-22 15:05:08: ORIGINAL_STATUS\n2015-04-22 15:05:08: DELIVERED\n"], ["updated_at", "2015-04-22 12:05:08.824765"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:05:08.825859"], ["log", "2015-04-22 15:05:08: ORIGINAL_STATUS\n2015-04-22 15:05:08: DELIVERED\n"], ["updated_at", "2015-04-22 12:05:08.826156"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:08.831743"], ["log", "2015-04-22 15:05:08: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:05:08.832137"], ["updated_at", "2015-04-22 12:05:08.832137"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:08.833465"], ["log", "2015-04-22 15:05:08: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:05:08.833798"], ["updated_at", "2015-04-22 12:05:08.833798"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:05:08 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_46871869"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:08.850857"], ["log", "2015-04-22 15:05:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:05:08.851267"], ["updated_at", "2015-04-22 12:05:08.851267"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_98097556"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:08.852403"], ["log", "2015-04-22 15:05:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:05:08.852691"], ["updated_at", "2015-04-22 12:05:08.852691"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:08.855999"], ["log", "2015-04-22 15:05:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:05:08.856291"], ["updated_at", "2015-04-22 12:05:08.856291"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:05:08.858118"], ["log", "2015-04-22 15:05:08: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:05:08.858399"], ["updated_at", "2015-04-22 12:05:08.858399"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:05:08.859217"], ["log", "2015-04-22 15:05:08: LOCAL_TEST\n2015-04-22 15:05:08: TEST_2\n"], ["updated_at", "2015-04-22 12:05:08.859482"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:08.861218"], ["log", "2015-04-22 15:05:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:05:08.861740"], ["updated_at", "2015-04-22 12:05:08.861740"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:08.863815"], ["log", "2015-04-22 15:05:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:05:08.864147"], ["updated_at", "2015-04-22 12:05:08.864147"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:05:08.865303"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:05:08.866621"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_8801822"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:08.867769"], ["log", "2015-04-22 15:05:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:05:08.868066"], ["updated_at", "2015-04-22 12:05:08.868066"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:29.568874"], ["log", "2015-04-22 15:05:29: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:05:29.569473"], ["updated_at", "2015-04-22 12:05:29.569473"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:29.572948"], ["log", "2015-04-22 15:05:29: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:05:29.573437"], ["updated_at", "2015-04-22 12:05:29.573437"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:29.585199"], ["log", "2015-04-22 15:05:29: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:05:29.585703"], ["updated_at", "2015-04-22 12:05:29.585703"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:29.591648"], ["log", "2015-04-22 15:05:29: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:05:29.592125"], ["updated_at", "2015-04-22 12:05:29.592125"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:29.594359"], ["log", "2015-04-22 15:05:29: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:05:29.594710"], ["updated_at", "2015-04-22 12:05:29.594710"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:05:29.596091"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:05:29.598419"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_48170855"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:29.599889"], ["log", "2015-04-22 15:05:29: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:05:29.600233"], ["updated_at", "2015-04-22 12:05:29.600233"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:05:29.616552"], ["log", "2015-04-22 15:05:29: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:05:29.616945"], ["updated_at", "2015-04-22 12:05:29.616945"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:05:29.618114"], ["log", "2015-04-22 15:05:29: LOCAL_TEST\n2015-04-22 15:05:29: TEST_2\n"], ["updated_at", "2015-04-22 12:05:29.618602"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:29.621760"], ["log", "2015-04-22 15:05:29: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:05:29.622147"], ["updated_at", "2015-04-22 12:05:29.622147"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:29.623481"], ["log", "2015-04-22 15:05:29: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:05:29.623804"], ["updated_at", "2015-04-22 12:05:29.623804"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:05:29.627146"], ["log", "2015-04-22 15:05:29: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:05:29.627507"], ["updated_at", "2015-04-22 12:05:29.627507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:05:29.628492"], ["log", "2015-04-22 15:05:29: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:05:29.628766"], ["updated_at", "2015-04-22 12:05:29.628766"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:05:29.632272"], ["log", "2015-04-22 15:05:29: ORIGINAL_STATUS\n2015-04-22 15:05:29: DELIVERED\n"], ["updated_at", "2015-04-22 12:05:29.632671"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:05:29.634064"], ["log", "2015-04-22 15:05:29: ORIGINAL_STATUS\n2015-04-22 15:05:29: DELIVERED\n"], ["updated_at", "2015-04-22 12:05:29.634380"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.4ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 12:05:29.639780"], ["updated_at", "2015-04-22 12:05:29.639780"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 12:05:29.640879"], ["updated_at", "2015-04-22 12:05:29.640879"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (2.2ms) Completed 200 OK in 4ms (Views: 3.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:05:29.648120"], ["log", "2015-04-22 15:05:29: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:05:29.648874"], ["updated_at", "2015-04-22 12:05:29.648874"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:05:29.652941"], ["log", "2015-04-22 15:05:29: ORIGINAL_STATUS\n2015-04-22 15:05:29: DELIVERED\n"], ["updated_at", "2015-04-22 12:05:29.653419"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.2ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 12:05:29.656587"], ["updated_at", "2015-04-22 12:05:29.656587"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 12:05:29.657694"], ["updated_at", "2015-04-22 12:05:29.657694"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:29.661252' AND '2015-04-22 11:55:29.661368')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:29.661252' AND '2015-04-22 11:55:29.661368') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:29.661252' AND '2015-04-22 11:55:29.661368')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:29.661252' AND '2015-04-22 11:55:29.661368') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:29.661252' AND '2015-04-22 11:55:29.661368')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:29.661252' AND '2015-04-22 11:55:29.661368') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.6ms) Completed 200 OK in 9ms (Views: 8.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 12:05:29.669104"], ["updated_at", "2015-04-22 12:05:29.669104"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 12:05:29.670227"], ["updated_at", "2015-04-22 12:05:29.670227"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:29.672814' AND '2015-04-22 11:55:29.672878')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:29.672814' AND '2015-04-22 11:55:29.672878') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:29.672814' AND '2015-04-22 11:55:29.672878')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:29.672814' AND '2015-04-22 11:55:29.672878') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:29.672814' AND '2015-04-22 11:55:29.672878')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:05:29.672814' AND '2015-04-22 11:55:29.672878') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.3ms) Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:29.685791"], ["log", "2015-04-22 15:05:29: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:05:29.686182"], ["updated_at", "2015-04-22 12:05:29.686182"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:29.687462"], ["log", "2015-04-22 15:05:29: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:05:29.687806"], ["updated_at", "2015-04-22 12:05:29.687806"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:05:29 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_25140647"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:29.698440"], ["log", "2015-04-22 15:05:29: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:05:29.698874"], ["updated_at", "2015-04-22 12:05:29.698874"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_95179105"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:05:29.700432"], ["log", "2015-04-22 15:05:29: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:05:29.700962"], ["updated_at", "2015-04-22 12:05:29.700962"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.4ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 12:06:43.108353"], ["updated_at", "2015-04-22 12:06:43.108353"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 12:06:43.110610"], ["updated_at", "2015-04-22 12:06:43.110610"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (4.8ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 12:06:43.121673"], ["updated_at", "2015-04-22 12:06:43.121673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 12:06:43.122929"], ["updated_at", "2015-04-22 12:06:43.122929"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:06:43.127586' AND '2015-04-22 11:56:43.127748')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:06:43.127586' AND '2015-04-22 11:56:43.127748') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:06:43.127586' AND '2015-04-22 11:56:43.127748')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:06:43.127586' AND '2015-04-22 11:56:43.127748') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:06:43.127586' AND '2015-04-22 11:56:43.127748')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:06:43.127586' AND '2015-04-22 11:56:43.127748') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (8.8ms) Completed 200 OK in 16ms (Views: 14.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 12:06:43.144167"], ["updated_at", "2015-04-22 12:06:43.144167"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 12:06:43.145319"], ["updated_at", "2015-04-22 12:06:43.145319"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:06:43.146907' AND '2015-04-22 11:56:43.146983')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:06:43.146907' AND '2015-04-22 11:56:43.146983') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:06:43.146907' AND '2015-04-22 11:56:43.146983')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:06:43.146907' AND '2015-04-22 11:56:43.146983') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:06:43.146907' AND '2015-04-22 11:56:43.146983')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:06:43.146907' AND '2015-04-22 11:56:43.146983') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (5.2ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:06:43.153804"], ["log", "2015-04-22 15:06:43: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:06:43.154298"], ["updated_at", "2015-04-22 12:06:43.154298"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:06:43.157584"], ["log", "2015-04-22 15:06:43: ORIGINAL_STATUS\n2015-04-22 15:06:43: DELIVERED\n"], ["updated_at", "2015-04-22 12:06:43.158075"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:06:43.161734"], ["log", "2015-04-22 15:06:43: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:06:43.162096"], ["updated_at", "2015-04-22 12:06:43.162096"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:06:43.163065"], ["log", "2015-04-22 15:06:43: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:06:43.163384"], ["updated_at", "2015-04-22 12:06:43.163384"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:06:43.165559"], ["log", "2015-04-22 15:06:43: ORIGINAL_STATUS\n2015-04-22 15:06:43: DELIVERED\n"], ["updated_at", "2015-04-22 12:06:43.165905"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:06:43.166988"], ["log", "2015-04-22 15:06:43: ORIGINAL_STATUS\n2015-04-22 15:06:43: DELIVERED\n"], ["updated_at", "2015-04-22 12:06:43.167338"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:06:43.173629"], ["log", "2015-04-22 15:06:43: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:06:43.173972"], ["updated_at", "2015-04-22 12:06:43.173972"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:06:43.175079"], ["log", "2015-04-22 15:06:43: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:06:43.175383"], ["updated_at", "2015-04-22 12:06:43.175383"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_60442665"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:06:43.178159"], ["log", "2015-04-22 15:06:43: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:06:43.178463"], ["updated_at", "2015-04-22 12:06:43.178463"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_10801091"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:06:43.179499"], ["log", "2015-04-22 15:06:43: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:06:43.179762"], ["updated_at", "2015-04-22 12:06:43.179762"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:06:43 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:06:43.191679"], ["log", "2015-04-22 15:06:43: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:06:43.192071"], ["updated_at", "2015-04-22 12:06:43.192071"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:06:43.193443"], ["log", "2015-04-22 15:06:43: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:06:43.193722"], ["updated_at", "2015-04-22 12:06:43.193722"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:06:43.206353"], ["log", "2015-04-22 15:06:43: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:06:43.206699"], ["updated_at", "2015-04-22 12:06:43.206699"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:06:43.207745"], ["log", "2015-04-22 15:06:43: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:06:43.208047"], ["updated_at", "2015-04-22 12:06:43.208047"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:06:43.212404"], ["log", "2015-04-22 15:06:43: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:06:43.212767"], ["updated_at", "2015-04-22 12:06:43.212767"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:06:43.215469"], ["log", "2015-04-22 15:06:43: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:06:43.215801"], ["updated_at", "2015-04-22 12:06:43.215801"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:06:43.217600"], ["log", "2015-04-22 15:06:43: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:06:43.217889"], ["updated_at", "2015-04-22 12:06:43.217889"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:06:43.218906"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:06:43.220218"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_92981977"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:06:43.221227"], ["log", "2015-04-22 15:06:43: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:06:43.221505"], ["updated_at", "2015-04-22 12:06:43.221505"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:06:43.228870"], ["log", "2015-04-22 15:06:43: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:06:43.229220"], ["updated_at", "2015-04-22 12:06:43.229220"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:06:43.230159"], ["log", "2015-04-22 15:06:43: LOCAL_TEST\n2015-04-22 15:06:43: TEST_2\n"], ["updated_at", "2015-04-22 12:06:43.230415"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_74126047"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:06.098568"], ["log", "2015-04-22 15:07:06: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:07:06.100116"], ["updated_at", "2015-04-22 12:07:06.100116"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_27940424"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:06.102772"], ["log", "2015-04-22 15:07:06: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:07:06.103363"], ["updated_at", "2015-04-22 12:07:06.103363"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 3ms (Views: 3.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 12:07:06.139389"], ["updated_at", "2015-04-22 12:07:06.139389"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 12:07:06.140633"], ["updated_at", "2015-04-22 12:07:06.140633"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (5.1ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:07:06.150898"], ["log", "2015-04-22 15:07:06: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:07:06.151317"], ["updated_at", "2015-04-22 12:07:06.151317"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:07:06.152330"], ["log", "2015-04-22 15:07:06: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:07:06.152587"], ["updated_at", "2015-04-22 12:07:06.152587"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:07:06.156859"], ["log", "2015-04-22 15:07:06: ORIGINAL_STATUS\n2015-04-22 15:07:06: DELIVERED\n"], ["updated_at", "2015-04-22 12:07:06.157256"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:07:06.159261"], ["log", "2015-04-22 15:07:06: ORIGINAL_STATUS\n2015-04-22 15:07:06: DELIVERED\n"], ["updated_at", "2015-04-22 12:07:06.159632"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 6ms (Views: 0.2ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 12:07:06.162457"], ["updated_at", "2015-04-22 12:07:06.162457"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 12:07:06.163614"], ["updated_at", "2015-04-22 12:07:06.163614"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:06.168552' AND '2015-04-22 11:57:06.168702')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:06.168552' AND '2015-04-22 11:57:06.168702') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:06.168552' AND '2015-04-22 11:57:06.168702')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:06.168552' AND '2015-04-22 11:57:06.168702') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:06.168552' AND '2015-04-22 11:57:06.168702')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:06.168552' AND '2015-04-22 11:57:06.168702') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (8.0ms) Completed 200 OK in 9ms (Views: 8.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 12:07:06.180012"], ["updated_at", "2015-04-22 12:07:06.180012"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 12:07:06.181146"], ["updated_at", "2015-04-22 12:07:06.181146"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:06.182926' AND '2015-04-22 11:57:06.182992')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:06.182926' AND '2015-04-22 11:57:06.182992') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:06.182926' AND '2015-04-22 11:57:06.182992')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:06.182926' AND '2015-04-22 11:57:06.182992') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:06.182926' AND '2015-04-22 11:57:06.182992')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:06.182926' AND '2015-04-22 11:57:06.182992') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.4ms) Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:07:06.188616"], ["log", "2015-04-22 15:07:06: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:07:06.188984"], ["updated_at", "2015-04-22 12:07:06.188984"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:07:06.196326"], ["log", "2015-04-22 15:07:06: ORIGINAL_STATUS\n2015-04-22 15:07:06: DELIVERED\n"], ["updated_at", "2015-04-22 12:07:06.196892"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 7ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:07:06 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:06.206694"], ["log", "2015-04-22 15:07:06: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:07:06.207047"], ["updated_at", "2015-04-22 12:07:06.207047"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:06.208222"], ["log", "2015-04-22 15:07:06: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:07:06.208479"], ["updated_at", "2015-04-22 12:07:06.208479"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:06.212358"], ["log", "2015-04-22 15:07:06: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:07:06.212710"], ["updated_at", "2015-04-22 12:07:06.212710"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:06.214875"], ["log", "2015-04-22 15:07:06: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:07:06.215215"], ["updated_at", "2015-04-22 12:07:06.215215"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:07:06.216416"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:07:06.217652"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_66668948"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:06.218656"], ["log", "2015-04-22 15:07:06: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:07:06.218947"], ["updated_at", "2015-04-22 12:07:06.218947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:07:06.227978"], ["log", "2015-04-22 15:07:06: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:07:06.228362"], ["updated_at", "2015-04-22 12:07:06.228362"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:07:06.229376"], ["log", "2015-04-22 15:07:06: LOCAL_TEST\n2015-04-22 15:07:06: TEST_2\n"], ["updated_at", "2015-04-22 12:07:06.229689"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:06.232190"], ["log", "2015-04-22 15:07:06: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:07:06.232498"], ["updated_at", "2015-04-22 12:07:06.232498"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:06.236072"], ["log", "2015-04-22 15:07:06: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:07:06.236378"], ["updated_at", "2015-04-22 12:07:06.236378"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:06.237357"], ["log", "2015-04-22 15:07:06: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:07:06.237643"], ["updated_at", "2015-04-22 12:07:06.237643"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:06.241367"], ["log", "2015-04-22 15:07:06: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:07:06.241673"], ["updated_at", "2015-04-22 12:07:06.241673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:06.242771"], ["log", "2015-04-22 15:07:06: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:07:06.243046"], ["updated_at", "2015-04-22 12:07:06.243046"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:31.175963"], ["log", "2015-04-22 15:07:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:07:31.177585"], ["updated_at", "2015-04-22 12:07:31.177585"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:31.180904"], ["log", "2015-04-22 15:07:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:07:31.181225"], ["updated_at", "2015-04-22 12:07:31.181225"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:07:31.182294"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:07:31.188350"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_95453199"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:31.189768"], ["log", "2015-04-22 15:07:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:07:31.190142"], ["updated_at", "2015-04-22 12:07:31.190142"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:31.201814"], ["log", "2015-04-22 15:07:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:07:31.202238"], ["updated_at", "2015-04-22 12:07:31.202238"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:07:31.204551"], ["log", "2015-04-22 15:07:31: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:07:31.204815"], ["updated_at", "2015-04-22 12:07:31.204815"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:07:31.205591"], ["log", "2015-04-22 15:07:31: LOCAL_TEST\n2015-04-22 15:07:31: TEST_2\n"], ["updated_at", "2015-04-22 12:07:31.205833"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:31.209232"], ["log", "2015-04-22 15:07:31: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:07:31.209568"], ["updated_at", "2015-04-22 12:07:31.209568"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:31.210527"], ["log", "2015-04-22 15:07:31: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:07:31.210809"], ["updated_at", "2015-04-22 12:07:31.210809"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:07:31 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 12:07:31.245210"], ["updated_at", "2015-04-22 12:07:31.245210"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 12:07:31.246431"], ["updated_at", "2015-04-22 12:07:31.246431"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (3.2ms) Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 12:07:31.256231"], ["updated_at", "2015-04-22 12:07:31.256231"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 12:07:31.257425"], ["updated_at", "2015-04-22 12:07:31.257425"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:31.261261' AND '2015-04-22 11:57:31.261389')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:31.261261' AND '2015-04-22 11:57:31.261389') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:31.261261' AND '2015-04-22 11:57:31.261389')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:31.261261' AND '2015-04-22 11:57:31.261389') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:31.261261' AND '2015-04-22 11:57:31.261389')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:31.261261' AND '2015-04-22 11:57:31.261389') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (12.5ms) Completed 200 OK in 14ms (Views: 13.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 12:07:31.274129"], ["updated_at", "2015-04-22 12:07:31.274129"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 12:07:31.275297"], ["updated_at", "2015-04-22 12:07:31.275297"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:31.277700' AND '2015-04-22 11:57:31.277783')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:31.277700' AND '2015-04-22 11:57:31.277783') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:31.277700' AND '2015-04-22 11:57:31.277783')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:31.277700' AND '2015-04-22 11:57:31.277783') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:31.277700' AND '2015-04-22 11:57:31.277783')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:07:31.277700' AND '2015-04-22 11:57:31.277783') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (8.5ms) Completed 200 OK in 9ms (Views: 8.5ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:07:31.291392"], ["log", "2015-04-22 15:07:31: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:07:31.291797"], ["updated_at", "2015-04-22 12:07:31.291797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:07:31.294674"], ["log", "2015-04-22 15:07:31: ORIGINAL_STATUS\n2015-04-22 15:07:31: DELIVERED\n"], ["updated_at", "2015-04-22 12:07:31.295036"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:07:31.297541"], ["log", "2015-04-22 15:07:31: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:07:31.297859"], ["updated_at", "2015-04-22 12:07:31.297859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:07:31.298856"], ["log", "2015-04-22 15:07:31: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:07:31.299175"], ["updated_at", "2015-04-22 12:07:31.299175"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:07:31.301696"], ["log", "2015-04-22 15:07:31: ORIGINAL_STATUS\n2015-04-22 15:07:31: DELIVERED\n"], ["updated_at", "2015-04-22 12:07:31.302091"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:07:31.303389"], ["log", "2015-04-22 15:07:31: ORIGINAL_STATUS\n2015-04-22 15:07:31: DELIVERED\n"], ["updated_at", "2015-04-22 12:07:31.303698"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:31.311808"], ["log", "2015-04-22 15:07:31: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:07:31.312254"], ["updated_at", "2015-04-22 12:07:31.312254"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:31.313711"], ["log", "2015-04-22 15:07:31: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:07:31.314101"], ["updated_at", "2015-04-22 12:07:31.314101"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:31.322335"], ["log", "2015-04-22 15:07:31: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:07:31.322726"], ["updated_at", "2015-04-22 12:07:31.322726"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:31.323982"], ["log", "2015-04-22 15:07:31: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:07:31.324280"], ["updated_at", "2015-04-22 12:07:31.324280"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_93387088"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:31.327577"], ["log", "2015-04-22 15:07:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:07:31.327890"], ["updated_at", "2015-04-22 12:07:31.327890"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_31513720"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:07:31.328880"], ["log", "2015-04-22 15:07:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:07:31.329150"], ["updated_at", "2015-04-22 12:07:31.329150"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:09:02 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 2.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.707885"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:09:02.709299"], ["updated_at", "2015-04-22 12:09:02.709299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.712057"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:09:02.712377"], ["updated_at", "2015-04-22 12:09:02.712377"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 12:09:02.715236"], ["updated_at", "2015-04-22 12:09:02.715236"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 12:09:02.716218"], ["updated_at", "2015-04-22 12:09:02.716218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:09:02.722441' AND '2015-04-22 11:59:02.722616')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:09:02.722441' AND '2015-04-22 11:59:02.722616') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:09:02.722441' AND '2015-04-22 11:59:02.722616')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:09:02.722441' AND '2015-04-22 11:59:02.722616') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:09:02.722441' AND '2015-04-22 11:59:02.722616')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:09:02.722441' AND '2015-04-22 11:59:02.722616') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (9.6ms) Completed 200 OK in 12ms (Views: 10.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:09:02.732121"], ["log", "2015-04-22 15:09:02: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:09:02.732504"], ["updated_at", "2015-04-22 12:09:02.732504"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:09:02.733525"], ["log", "2015-04-22 15:09:02: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:09:02.733818"], ["updated_at", "2015-04-22 12:09:02.733818"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:09:02.737380"], ["log", "2015-04-22 15:09:02: ORIGINAL_STATUS\n2015-04-22 15:09:02: DELIVERED\n"], ["updated_at", "2015-04-22 12:09:02.737859"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:09:02.739540"], ["log", "2015-04-22 15:09:02: ORIGINAL_STATUS\n2015-04-22 15:09:02: DELIVERED\n"], ["updated_at", "2015-04-22 12:09:02.739967"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:09:02.742650"], ["log", "2015-04-22 15:09:02: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:09:02.742978"], ["updated_at", "2015-04-22 12:09:02.742978"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:09:02.745650"], ["log", "2015-04-22 15:09:02: ORIGINAL_STATUS\n2015-04-22 15:09:02: DELIVERED\n"], ["updated_at", "2015-04-22 12:09:02.746013"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 12:09:02.752571"], ["updated_at", "2015-04-22 12:09:02.752571"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 12:09:02.753733"], ["updated_at", "2015-04-22 12:09:02.753733"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (4.2ms) Completed 200 OK in 5ms (Views: 5.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 12:09:02.765368"], ["updated_at", "2015-04-22 12:09:02.765368"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 12:09:02.766453"], ["updated_at", "2015-04-22 12:09:02.766453"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:09:02.768086' AND '2015-04-22 11:59:02.768153')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:09:02.768086' AND '2015-04-22 11:59:02.768153') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:09:02.768086' AND '2015-04-22 11:59:02.768153')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:09:02.768086' AND '2015-04-22 11:59:02.768153') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:09:02.768086' AND '2015-04-22 11:59:02.768153')  (0.2ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:09:02.768086' AND '2015-04-22 11:59:02.768153') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (9.0ms) Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:09:02.787226"], ["log", "2015-04-22 15:09:02: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:09:02.787536"], ["updated_at", "2015-04-22 12:09:02.787536"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:09:02.788480"], ["log", "2015-04-22 15:09:02: LOCAL_TEST\n2015-04-22 15:09:02: TEST_2\n"], ["updated_at", "2015-04-22 12:09:02.788744"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.790163"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:09:02.790448"], ["updated_at", "2015-04-22 12:09:02.790448"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.792540"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:09:02.792943"], ["updated_at", "2015-04-22 12:09:02.792943"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.794528"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:09:02.794813"], ["updated_at", "2015-04-22 12:09:02.794813"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:09:02.795887"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:09:02.797112"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_50427583"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.798124"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:09:02.798390"], ["updated_at", "2015-04-22 12:09:02.798390"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.808741"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:09:02.809235"], ["updated_at", "2015-04-22 12:09:02.809235"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.810840"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:09:02.811249"], ["updated_at", "2015-04-22 12:09:02.811249"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.814777"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:09:02.815138"], ["updated_at", "2015-04-22 12:09:02.815138"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.816376"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:09:02.816677"], ["updated_at", "2015-04-22 12:09:02.816677"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.819100"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:09:02.819457"], ["updated_at", "2015-04-22 12:09:02.819457"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.820532"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:09:02.820811"], ["updated_at", "2015-04-22 12:09:02.820811"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.823092"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:09:02.823487"], ["updated_at", "2015-04-22 12:09:02.823487"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.824649"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:09:02.824947"], ["updated_at", "2015-04-22 12:09:02.824947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.2ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_14146671"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.827246"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:09:02.827551"], ["updated_at", "2015-04-22 12:09:02.827551"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_7233470"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.828509"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:09:02.828762"], ["updated_at", "2015-04-22 12:09:02.828762"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_39586141"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.830294"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:09:02.830569"], ["updated_at", "2015-04-22 12:09:02.830569"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_90813174"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.831536"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:09:02.831816"], ["updated_at", "2015-04-22 12:09:02.831816"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_43767127"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.833277"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:09:02.833551"], ["updated_at", "2015-04-22 12:09:02.833551"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_21325899"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.834502"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:09:02.834802"], ["updated_at", "2015-04-22 12:09:02.834802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_90698583"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.836141"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:09:02.836416"], ["updated_at", "2015-04-22 12:09:02.836416"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_48683565"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:09:02.837342"], ["log", "2015-04-22 15:09:02: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:09:02.837618"], ["updated_at", "2015-04-22 12:09:02.837618"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (44.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)   (0.2ms) select sqlite_version(*)  (44.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateActionSmserDeliveryReports (20120102215215)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "action_smser_delivery_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "msg_id" varchar, "status" varchar, "status_updated_at" datetime, "sms_type" varchar, "log" text, "to" varchar, "from" varchar, "body" varchar, "gateway" varchar, "re_delivery_of_delivery_report_id" integer, "re_delivered" boolean, "created_at" datetime, "updated_at" datetime)  (0.1ms) CREATE INDEX "index_action_smser_delivery_reports_on_msg_id" ON "action_smser_delivery_reports" ("msg_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120102215215"]]  (57.4ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_action_smser_delivery_reports_on_msg_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_action_smser_delivery_reports_on_msg_id' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:17:08 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 2.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:17:08.791286"], ["log", "2015-04-22 15:17:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:17:08.792721"], ["updated_at", "2015-04-22 12:17:08.792721"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:17:08.795522"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:17:08.800217"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_52675043"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:17:08.801354"], ["log", "2015-04-22 15:17:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:17:08.801676"], ["updated_at", "2015-04-22 12:17:08.801676"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:17:08.812651"], ["log", "2015-04-22 15:17:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:17:08.813038"], ["updated_at", "2015-04-22 12:17:08.813038"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:17:08.815385"], ["log", "2015-04-22 15:17:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:17:08.815745"], ["updated_at", "2015-04-22 12:17:08.815745"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:17:08.817353"], ["log", "2015-04-22 15:17:08: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:17:08.817648"], ["updated_at", "2015-04-22 12:17:08.817648"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:17:08.818441"], ["log", "2015-04-22 15:17:08: LOCAL_TEST\n2015-04-22 15:17:08: TEST_2\n"], ["updated_at", "2015-04-22 12:17:08.818706"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:17:08.822988"], ["log", "2015-04-22 15:17:08: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:17:08.823437"], ["updated_at", "2015-04-22 12:17:08.823437"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:17:08.824512"], ["log", "2015-04-22 15:17:08: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:17:08.824823"], ["updated_at", "2015-04-22 12:17:08.824823"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:17:08.829187"], ["log", "2015-04-22 15:17:08: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:17:08.829527"], ["updated_at", "2015-04-22 12:17:08.829527"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:17:08.830737"], ["log", "2015-04-22 15:17:08: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:17:08.831036"], ["updated_at", "2015-04-22 12:17:08.831036"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_51566091"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:17:08.842225"], ["log", "2015-04-22 15:17:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:17:08.842583"], ["updated_at", "2015-04-22 12:17:08.842583"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_32837351"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:17:08.843750"], ["log", "2015-04-22 15:17:08: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:17:08.844176"], ["updated_at", "2015-04-22 12:17:08.844176"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 6ms (Views: 0.2ms | ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:17:08.857083"], ["log", "2015-04-22 15:17:08: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:17:08.857521"], ["updated_at", "2015-04-22 12:17:08.857521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:17:08.858509"], ["log", "2015-04-22 15:17:08: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:17:08.858795"], ["updated_at", "2015-04-22 12:17:08.858795"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:17:08.861163"], ["log", "2015-04-22 15:17:08: ORIGINAL_STATUS\n2015-04-22 15:17:08: DELIVERED\n"], ["updated_at", "2015-04-22 12:17:08.861569"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:17:08.862731"], ["log", "2015-04-22 15:17:08: ORIGINAL_STATUS\n2015-04-22 15:17:08: DELIVERED\n"], ["updated_at", "2015-04-22 12:17:08.863034"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 12:17:08.865991"], ["updated_at", "2015-04-22 12:17:08.865991"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 12:17:08.867144"], ["updated_at", "2015-04-22 12:17:08.867144"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:17:08.871736' AND '2015-04-22 12:07:08.871858')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:17:08.871736' AND '2015-04-22 12:07:08.871858') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:17:08.871736' AND '2015-04-22 12:07:08.871858')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:17:08.871736' AND '2015-04-22 12:07:08.871858') GROUP BY "action_smser_delivery_reports"."status"  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:17:08.871736' AND '2015-04-22 12:07:08.871858')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:17:08.871736' AND '2015-04-22 12:07:08.871858') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.5ms) Completed 200 OK in 9ms (Views: 8.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 12:17:08.879433"], ["updated_at", "2015-04-22 12:17:08.879433"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 12:17:08.880537"], ["updated_at", "2015-04-22 12:17:08.880537"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:17:08.882795' AND '2015-04-22 12:07:08.882853')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:17:08.882795' AND '2015-04-22 12:07:08.882853') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:17:08.882795' AND '2015-04-22 12:07:08.882853')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:17:08.882795' AND '2015-04-22 12:07:08.882853') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:17:08.882795' AND '2015-04-22 12:07:08.882853')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:17:08.882795' AND '2015-04-22 12:07:08.882853') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.0ms) Completed 200 OK in 5ms (Views: 4.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:17:08.889853"], ["log", "2015-04-22 15:17:08: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:17:08.890214"], ["updated_at", "2015-04-22 12:17:08.890214"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:17:08.892825"], ["log", "2015-04-22 15:17:08: ORIGINAL_STATUS\n2015-04-22 15:17:08: DELIVERED\n"], ["updated_at", "2015-04-22 12:17:08.893239"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 12:17:08.896174"], ["updated_at", "2015-04-22 12:17:08.896174"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 12:17:08.897381"], ["updated_at", "2015-04-22 12:17:08.897381"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (2.3ms) Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:17:08.905771"], ["log", "2015-04-22 15:17:08: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:17:08.906135"], ["updated_at", "2015-04-22 12:17:08.906135"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "4917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:17:08.907253"], ["log", "2015-04-22 15:17:08: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:17:08.907577"], ["updated_at", "2015-04-22 12:17:08.907577"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=4917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:31:21 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 3.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123", "004915112341234", "04917332341111"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123", "004915112341234", "04917332341111"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:31:21.793685"], ["log", "2015-04-22 15:31:21: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:31:21.795296"], ["updated_at", "2015-04-22 12:31:21.795296"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:31:21.797597"], ["log", "2015-04-22 15:31:21: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:31:21.798035"], ["updated_at", "2015-04-22 12:31:21.798035"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_62474984"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:31:21.801252"], ["log", "2015-04-22 15:31:21: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:31:21.801554"], ["updated_at", "2015-04-22 12:31:21.801554"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_37797737"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:31:21.802516"], ["log", "2015-04-22 15:31:21: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:31:21.802778"], ["updated_at", "2015-04-22 12:31:21.802778"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 12:31:21.807370"], ["updated_at", "2015-04-22 12:31:21.807370"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 12:31:21.808388"], ["updated_at", "2015-04-22 12:31:21.808388"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (5.3ms) Completed 200 OK in 7ms (Views: 7.0ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:31:21.819738"], ["log", "2015-04-22 15:31:21: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:31:21.820229"], ["updated_at", "2015-04-22 12:31:21.820229"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:31:21.825488"], ["log", "2015-04-22 15:31:21: ORIGINAL_STATUS\n2015-04-22 15:31:21: DELIVERED\n"], ["updated_at", "2015-04-22 12:31:21.825967"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 12:31:21.829434"], ["updated_at", "2015-04-22 12:31:21.829434"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 12:31:21.830479"], ["updated_at", "2015-04-22 12:31:21.830479"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:31:21.834012' AND '2015-04-22 12:21:21.834133')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:31:21.834012' AND '2015-04-22 12:21:21.834133') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:31:21.834012' AND '2015-04-22 12:21:21.834133')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:31:21.834012' AND '2015-04-22 12:21:21.834133') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:31:21.834012' AND '2015-04-22 12:21:21.834133')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:31:21.834012' AND '2015-04-22 12:21:21.834133') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.5ms) Completed 200 OK in 9ms (Views: 8.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:31:21.841686"], ["log", "2015-04-22 15:31:21: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:31:21.842064"], ["updated_at", "2015-04-22 12:31:21.842064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:31:21.843082"], ["log", "2015-04-22 15:31:21: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:31:21.843437"], ["updated_at", "2015-04-22 12:31:21.843437"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:31:21.845945"], ["log", "2015-04-22 15:31:21: ORIGINAL_STATUS\n2015-04-22 15:31:21: DELIVERED\n"], ["updated_at", "2015-04-22 12:31:21.846344"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:31:21.847617"], ["log", "2015-04-22 15:31:21: ORIGINAL_STATUS\n2015-04-22 15:31:21: DELIVERED\n"], ["updated_at", "2015-04-22 12:31:21.848024"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 12:31:21.861809"], ["updated_at", "2015-04-22 12:31:21.861809"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 12:31:21.862812"], ["updated_at", "2015-04-22 12:31:21.862812"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:31:21.865113' AND '2015-04-22 12:21:21.865181')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:31:21.865113' AND '2015-04-22 12:21:21.865181') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:31:21.865113' AND '2015-04-22 12:21:21.865181')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:31:21.865113' AND '2015-04-22 12:21:21.865181') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:31:21.865113' AND '2015-04-22 12:21:21.865181')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:31:21.865113' AND '2015-04-22 12:21:21.865181') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.2ms) Completed 200 OK in 5ms (Views: 4.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "004915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:31:21.872331"], ["log", "2015-04-22 15:31:21: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:31:21.872674"], ["updated_at", "2015-04-22 12:31:21.872674"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "004917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:31:21.873785"], ["log", "2015-04-22 15:31:21: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:31:21.874057"], ["updated_at", "2015-04-22 12:31:21.874057"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::SmstradeTest: test_should_append_00_to_phone_numbers_before_sending -------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------- ActionSmser::SmstradeTest: test_should_only_receive_numbers_not_prepended_with_zeros_or_plus_signs --------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:31:21.882325"], ["log", "2015-04-22 15:31:21: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:31:21.882727"], ["updated_at", "2015-04-22 12:31:21.882727"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:31:21.883967"], ["log", "2015-04-22 15:31:21: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:31:21.884254"], ["updated_at", "2015-04-22 12:31:21.884254"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:31:21.886963"], ["log", "2015-04-22 15:31:21: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:31:21.887275"], ["updated_at", "2015-04-22 12:31:21.887275"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:31:21.888314"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:31:21.889882"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_31913897"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:31:21.890928"], ["log", "2015-04-22 15:31:21: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:31:21.891258"], ["updated_at", "2015-04-22 12:31:21.891258"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:31:21.899816"], ["log", "2015-04-22 15:31:21: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:31:21.900163"], ["updated_at", "2015-04-22 12:31:21.900163"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:31:21.901923"], ["log", "2015-04-22 15:31:21: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:31:21.902203"], ["updated_at", "2015-04-22 12:31:21.902203"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:31:21.903671"], ["log", "2015-04-22 15:31:21: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:31:21.903945"], ["updated_at", "2015-04-22 12:31:21.903945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:31:21.904705"], ["log", "2015-04-22 15:31:21: LOCAL_TEST\n2015-04-22 15:31:21: TEST_2\n"], ["updated_at", "2015-04-22 12:31:21.904988"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:33:57.587448"], ["log", "2015-04-22 15:33:57: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:33:57.589283"], ["updated_at", "2015-04-22 12:33:57.589283"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:33:57.593663"], ["log", "2015-04-22 15:33:57: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:33:57.594094"], ["updated_at", "2015-04-22 12:33:57.594094"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:33:57.595447"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:33:57.600560"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_16135563"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:33:57.602075"], ["log", "2015-04-22 15:33:57: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:33:57.602741"], ["updated_at", "2015-04-22 12:33:57.602741"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:33:57.615540"], ["log", "2015-04-22 15:33:57: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:33:57.616007"], ["updated_at", "2015-04-22 12:33:57.616007"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:33:57.617111"], ["log", "2015-04-22 15:33:57: LOCAL_TEST\n2015-04-22 15:33:57: TEST_2\n"], ["updated_at", "2015-04-22 12:33:57.617475"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:33:57.619614"], ["log", "2015-04-22 15:33:57: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:33:57.619897"], ["updated_at", "2015-04-22 12:33:57.619897"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::SmstradeTest: test_should_append_00_to_phone_numbers_before_sending -------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------- ActionSmser::SmstradeTest: test_should_only_receive_numbers_not_prepended_with_zeros_or_plus_signs --------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "004915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:33:57.625409"], ["log", "2015-04-22 15:33:57: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:33:57.625752"], ["updated_at", "2015-04-22 12:33:57.625752"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "004917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:33:57.626943"], ["log", "2015-04-22 15:33:57: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:33:57.627249"], ["updated_at", "2015-04-22 12:33:57.627249"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:33:57.631781"], ["log", "2015-04-22 15:33:57: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:33:57.632101"], ["updated_at", "2015-04-22 12:33:57.632101"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:33:57.633485"], ["log", "2015-04-22 15:33:57: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:33:57.634097"], ["updated_at", "2015-04-22 12:33:57.634097"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:33:57.644223"], ["log", "2015-04-22 15:33:57: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:33:57.644605"], ["updated_at", "2015-04-22 12:33:57.644605"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:33:57.645664"], ["log", "2015-04-22 15:33:57: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:33:57.645957"], ["updated_at", "2015-04-22 12:33:57.645957"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123", "004915112341234", "04917332341111"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123", "004915112341234", "04917332341111"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:33:57.680287"], ["log", "2015-04-22 15:33:57: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:33:57.680764"], ["updated_at", "2015-04-22 12:33:57.680764"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:33:57.686443"], ["log", "2015-04-22 15:33:57: ORIGINAL_STATUS\n2015-04-22 15:33:57: DELIVERED\n"], ["updated_at", "2015-04-22 12:33:57.686900"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 5ms (Views: 2.7ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:33:57.703365"], ["log", "2015-04-22 15:33:57: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:33:57.703722"], ["updated_at", "2015-04-22 12:33:57.703722"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:33:57.704636"], ["log", "2015-04-22 15:33:57: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:33:57.704896"], ["updated_at", "2015-04-22 12:33:57.704896"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:33:57.706986"], ["log", "2015-04-22 15:33:57: ORIGINAL_STATUS\n2015-04-22 15:33:57: DELIVERED\n"], ["updated_at", "2015-04-22 12:33:57.707371"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:33:57.708553"], ["log", "2015-04-22 15:33:57: ORIGINAL_STATUS\n2015-04-22 15:33:57: DELIVERED\n"], ["updated_at", "2015-04-22 12:33:57.708861"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 12:33:57.712235"], ["updated_at", "2015-04-22 12:33:57.712235"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 12:33:57.713409"], ["updated_at", "2015-04-22 12:33:57.713409"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:33:57.718699' AND '2015-04-22 12:23:57.718831')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:33:57.718699' AND '2015-04-22 12:23:57.718831') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:33:57.718699' AND '2015-04-22 12:23:57.718831')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:33:57.718699' AND '2015-04-22 12:23:57.718831') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:33:57.718699' AND '2015-04-22 12:23:57.718831')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:33:57.718699' AND '2015-04-22 12:23:57.718831') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (7.9ms) Completed 200 OK in 10ms (Views: 9.6ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 12:33:57.727658"], ["updated_at", "2015-04-22 12:33:57.727658"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 12:33:57.729126"], ["updated_at", "2015-04-22 12:33:57.729126"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:33:57.731720' AND '2015-04-22 12:23:57.731805')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:33:57.731720' AND '2015-04-22 12:23:57.731805') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:33:57.731720' AND '2015-04-22 12:23:57.731805')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:33:57.731720' AND '2015-04-22 12:23:57.731805') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:33:57.731720' AND '2015-04-22 12:23:57.731805')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:33:57.731720' AND '2015-04-22 12:23:57.731805') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.8ms) Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 12:33:57.738035"], ["updated_at", "2015-04-22 12:33:57.738035"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 12:33:57.739189"], ["updated_at", "2015-04-22 12:33:57.739189"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (2.4ms) Completed 200 OK in 3ms (Views: 3.1ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:33:57 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_34478981"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:33:57.752411"], ["log", "2015-04-22 15:33:57: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:33:57.752798"], ["updated_at", "2015-04-22 12:33:57.752798"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_55227242"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:33:57.753943"], ["log", "2015-04-22 15:33:57: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:33:57.754250"], ["updated_at", "2015-04-22 12:33:57.754250"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_36700426"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:34:31.094933"], ["log", "2015-04-22 15:34:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:34:31.096904"], ["updated_at", "2015-04-22 12:34:31.096904"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_95499602"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:34:31.101360"], ["log", "2015-04-22 15:34:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:34:31.102010"], ["updated_at", "2015-04-22 12:34:31.102010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.3ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 7ms (Views: 3.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 12:34:31.152058"], ["updated_at", "2015-04-22 12:34:31.152058"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_5"], ["created_at", "2015-04-22 12:34:31.153361"], ["updated_at", "2015-04-22 12:34:31.153361"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (6.2ms) Completed 200 OK in 9ms (Views: 8.4ms | ActiveRecord: 0.2ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:34:31.168826"], ["log", "2015-04-22 15:34:31: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:34:31.169370"], ["updated_at", "2015-04-22 12:34:31.169370"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:34:31.174492"], ["log", "2015-04-22 15:34:31: ORIGINAL_STATUS\n2015-04-22 15:34:31: DELIVERED\n"], ["updated_at", "2015-04-22 12:34:31.175067"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:34:31.181048"], ["log", "2015-04-22 15:34:31: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:34:31.181428"], ["updated_at", "2015-04-22 12:34:31.181428"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:34:31.182454"], ["log", "2015-04-22 15:34:31: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:34:31.182864"], ["updated_at", "2015-04-22 12:34:31.182864"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:34:31.185404"], ["log", "2015-04-22 15:34:31: ORIGINAL_STATUS\n2015-04-22 15:34:31: DELIVERED\n"], ["updated_at", "2015-04-22 12:34:31.185808"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:34:31.187104"], ["log", "2015-04-22 15:34:31: ORIGINAL_STATUS\n2015-04-22 15:34:31: DELIVERED\n"], ["updated_at", "2015-04-22 12:34:31.187603"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 12:34:31.193229"], ["updated_at", "2015-04-22 12:34:31.193229"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 12:34:31.194322"], ["updated_at", "2015-04-22 12:34:31.194322"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:34:31.198180' AND '2015-04-22 12:24:31.198304')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:34:31.198180' AND '2015-04-22 12:24:31.198304') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:34:31.198180' AND '2015-04-22 12:24:31.198304')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:34:31.198180' AND '2015-04-22 12:24:31.198304') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:34:31.198180' AND '2015-04-22 12:24:31.198304')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:34:31.198180' AND '2015-04-22 12:24:31.198304') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (8.6ms) Completed 200 OK in 10ms (Views: 9.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 12:34:31.207365"], ["updated_at", "2015-04-22 12:34:31.207365"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_9"], ["created_at", "2015-04-22 12:34:31.208579"], ["updated_at", "2015-04-22 12:34:31.208579"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:34:31.211069' AND '2015-04-22 12:24:31.211185')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:34:31.211069' AND '2015-04-22 12:24:31.211185') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:34:31.211069' AND '2015-04-22 12:24:31.211185')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:34:31.211069' AND '2015-04-22 12:24:31.211185') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:34:31.211069' AND '2015-04-22 12:24:31.211185')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:34:31.211069' AND '2015-04-22 12:24:31.211185') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.8ms) Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:34:31.221408"], ["log", "2015-04-22 15:34:31: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:34:31.222001"], ["updated_at", "2015-04-22 12:34:31.222001"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:34:31.223503"], ["log", "2015-04-22 15:34:31: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:34:31.224009"], ["updated_at", "2015-04-22 12:34:31.224009"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123", "004915112341234", "04917332341111"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123", "004915112341234", "04917332341111"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:34:31 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:34:31.251870"], ["log", "2015-04-22 15:34:31: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:34:31.252273"], ["updated_at", "2015-04-22 12:34:31.252273"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:34:31.253418"], ["log", "2015-04-22 15:34:31: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:34:31.253711"], ["updated_at", "2015-04-22 12:34:31.253711"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::SmstradeTest: test_should_append_00_to_phone_numbers_before_sending -------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------- ActionSmser::SmstradeTest: test_should_only_receive_numbers_not_prepended_with_zeros_or_plus_signs --------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "004915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:34:31.261926"], ["log", "2015-04-22 15:34:31: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:34:31.262304"], ["updated_at", "2015-04-22 12:34:31.262304"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "004917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:34:31.263693"], ["log", "2015-04-22 15:34:31: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:34:31.264039"], ["updated_at", "2015-04-22 12:34:31.264039"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:34:31.266678"], ["log", "2015-04-22 15:34:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:34:31.267015"], ["updated_at", "2015-04-22 12:34:31.267015"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:34:31.268685"], ["log", "2015-04-22 15:34:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:34:31.268981"], ["updated_at", "2015-04-22 12:34:31.268981"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:34:31.269949"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:34:31.272397"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_79767905"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:34:31.274626"], ["log", "2015-04-22 15:34:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:34:31.275132"], ["updated_at", "2015-04-22 12:34:31.275132"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:34:31.288919"], ["log", "2015-04-22 15:34:31: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:34:31.289611"], ["updated_at", "2015-04-22 12:34:31.289611"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:34:31.291224"], ["log", "2015-04-22 15:34:31: LOCAL_TEST\n2015-04-22 15:34:31: TEST_2\n"], ["updated_at", "2015-04-22 12:34:31.291649"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:34:31.294462"], ["log", "2015-04-22 15:34:31: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:34:31.294899"], ["updated_at", "2015-04-22 12:34:31.294899"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123", "004915112341234", "04917332341111"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123", "004915112341234", "04917332341111"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:45:13.957391"], ["log", "2015-04-22 15:45:13: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:45:13.959727"], ["updated_at", "2015-04-22 12:45:13.959727"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:45:13.963121"], ["log", "2015-04-22 15:45:13: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:45:13.963545"], ["updated_at", "2015-04-22 12:45:13.963545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------- ActionSmser::SmstradeTest: test_should_only_receive_numbers_not_prepended_with_zeros_or_plus_signs --------------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::SmstradeTest: test_should_append_00_to_phone_numbers_before_sending -------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "004915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:45:13.972130"], ["log", "2015-04-22 15:45:13: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:45:13.972573"], ["updated_at", "2015-04-22 12:45:13.972573"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "004917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:45:13.973852"], ["log", "2015-04-22 15:45:13: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:45:13.974142"], ["updated_at", "2015-04-22 12:45:13.974142"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:45:13.978344"], ["log", "2015-04-22 15:45:13: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:45:13.978673"], ["updated_at", "2015-04-22 12:45:13.978673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:45:13.979729"], ["log", "2015-04-22 15:45:13: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:45:13.980009"], ["updated_at", "2015-04-22 12:45:13.980009"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:45:13 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 3.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_34965443"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:45:14.027852"], ["log", "2015-04-22 15:45:14: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:45:14.028345"], ["updated_at", "2015-04-22 12:45:14.028345"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_47199764"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:45:14.029574"], ["log", "2015-04-22 15:45:14: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:45:14.029889"], ["updated_at", "2015-04-22 12:45:14.029889"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:45:14.032041"], ["log", "2015-04-22 15:45:14: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:45:14.032363"], ["updated_at", "2015-04-22 12:45:14.032363"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:45:14.033234"], ["log", "2015-04-22 15:45:14: LOCAL_TEST\n2015-04-22 15:45:14: TEST_2\n"], ["updated_at", "2015-04-22 12:45:14.033511"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:45:14.037880"], ["log", "2015-04-22 15:45:14: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:45:14.038228"], ["updated_at", "2015-04-22 12:45:14.038228"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:45:14.042115"], ["log", "2015-04-22 15:45:14: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:45:14.042499"], ["updated_at", "2015-04-22 12:45:14.042499"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:45:14.044049"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:45:14.045552"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_90045397"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:45:14.046673"], ["log", "2015-04-22 15:45:14: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:45:14.046997"], ["updated_at", "2015-04-22 12:45:14.046997"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:45:14.065609"], ["log", "2015-04-22 15:45:14: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:45:14.065994"], ["updated_at", "2015-04-22 12:45:14.065994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 12:45:14.073131"], ["updated_at", "2015-04-22 12:45:14.073131"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 12:45:14.074246"], ["updated_at", "2015-04-22 12:45:14.074246"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:45:14.079800' AND '2015-04-22 12:35:14.079921')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:45:14.079800' AND '2015-04-22 12:35:14.079921') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:45:14.079800' AND '2015-04-22 12:35:14.079921')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:45:14.079800' AND '2015-04-22 12:35:14.079921') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:45:14.079800' AND '2015-04-22 12:35:14.079921')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:45:14.079800' AND '2015-04-22 12:35:14.079921') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (8.5ms) Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:45:14.088642"], ["log", "2015-04-22 15:45:14: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:45:14.089062"], ["updated_at", "2015-04-22 12:45:14.089062"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:45:14.092519"], ["log", "2015-04-22 15:45:14: ORIGINAL_STATUS\n2015-04-22 15:45:14: DELIVERED\n"], ["updated_at", "2015-04-22 12:45:14.092902"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 12:45:14.095501"], ["updated_at", "2015-04-22 12:45:14.095501"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 12:45:14.096546"], ["updated_at", "2015-04-22 12:45:14.096546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (2.3ms) Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:45:14.106127"], ["log", "2015-04-22 15:45:14: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:45:14.106534"], ["updated_at", "2015-04-22 12:45:14.106534"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:45:14.107514"], ["log", "2015-04-22 15:45:14: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:45:14.107797"], ["updated_at", "2015-04-22 12:45:14.107797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:45:14.110309"], ["log", "2015-04-22 15:45:14: ORIGINAL_STATUS\n2015-04-22 15:45:14: DELIVERED\n"], ["updated_at", "2015-04-22 12:45:14.110700"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:45:14.112052"], ["log", "2015-04-22 15:45:14: ORIGINAL_STATUS\n2015-04-22 15:45:14: DELIVERED\n"], ["updated_at", "2015-04-22 12:45:14.112370"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.3ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_3"], ["created_at", "2015-04-22 12:45:14.117216"], ["updated_at", "2015-04-22 12:45:14.117216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_0"], ["created_at", "2015-04-22 12:45:14.118328"], ["updated_at", "2015-04-22 12:45:14.118328"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:45:14.120232' AND '2015-04-22 12:35:14.120331')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:45:14.120232' AND '2015-04-22 12:35:14.120331') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:45:14.120232' AND '2015-04-22 12:35:14.120331')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:45:14.120232' AND '2015-04-22 12:35:14.120331') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:45:14.120232' AND '2015-04-22 12:35:14.120331')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:45:14.120232' AND '2015-04-22 12:35:14.120331') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (4.4ms) Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 12:48:22.363749"], ["log", "2015-04-22 15:48:22: LOCAL_TEST\n"], ["created_at", "2015-04-22 12:48:22.365359"], ["updated_at", "2015-04-22 12:48:22.365359"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 12:48:22.368330"], ["log", "2015-04-22 15:48:22: LOCAL_TEST\n2015-04-22 15:48:22: TEST_2\n"], ["updated_at", "2015-04-22 12:48:22.368710"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:48:22.372939"], ["log", "2015-04-22 15:48:22: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:48:22.373345"], ["updated_at", "2015-04-22 12:48:22.373345"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:48:22.375488"], ["log", "2015-04-22 15:48:22: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:48:22.375849"], ["updated_at", "2015-04-22 12:48:22.375849"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 12:48:22.377133"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 12:48:22.381248"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_37804369"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:48:22.383023"], ["log", "2015-04-22 15:48:22: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:48:22.383432"], ["updated_at", "2015-04-22 12:48:22.383432"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:48:22.395564"], ["log", "2015-04-22 15:48:22: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:48:22.396027"], ["updated_at", "2015-04-22 12:48:22.396027"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:48:22.402220"], ["log", "2015-04-22 15:48:22: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:48:22.402606"], ["updated_at", "2015-04-22 12:48:22.402606"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:48:22.403781"], ["log", "2015-04-22 15:48:22: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 12:48:22.404085"], ["updated_at", "2015-04-22 12:48:22.404085"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::SmstradeTest: test_should_append_00_to_phone_numbers_before_sending -------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------- ActionSmser::SmstradeTest: test_should_only_receive_numbers_not_prepended_with_zeros_or_plus_signs --------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "004915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:48:22.409680"], ["log", "2015-04-22 15:48:22: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:48:22.410122"], ["updated_at", "2015-04-22 12:48:22.410122"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "004917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:48:22.411562"], ["log", "2015-04-22 15:48:22: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 12:48:22.411951"], ["updated_at", "2015-04-22 12:48:22.411951"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_67374145"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:48:22.417570"], ["log", "2015-04-22 15:48:22: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:48:22.417997"], ["updated_at", "2015-04-22 12:48:22.417997"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_61844339"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:48:22.419243"], ["log", "2015-04-22 15:48:22: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 12:48:22.419597"], ["updated_at", "2015-04-22 12:48:22.419597"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:48:22.425946"], ["log", "2015-04-22 15:48:22: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:48:22.426333"], ["updated_at", "2015-04-22 12:48:22.426333"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 12:48:22.427706"], ["log", "2015-04-22 15:48:22: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 12:48:22.428054"], ["updated_at", "2015-04-22 12:48:22.428054"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 15:48:22 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 3ms (Views: 3.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:48:22.480580"], ["log", "2015-04-22 15:48:22: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:48:22.480994"], ["updated_at", "2015-04-22 12:48:22.480994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:48:22.484119"], ["log", "2015-04-22 15:48:22: ORIGINAL_STATUS\n2015-04-22 15:48:22: DELIVERED\n"], ["updated_at", "2015-04-22 12:48:22.484540"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:48:22.487396"], ["log", "2015-04-22 15:48:22: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:48:22.487756"], ["updated_at", "2015-04-22 12:48:22.487756"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 12:48:22.488800"], ["log", "2015-04-22 15:48:22: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 12:48:22.489219"], ["updated_at", "2015-04-22 12:48:22.489219"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:48:22.491999"], ["log", "2015-04-22 15:48:22: ORIGINAL_STATUS\n2015-04-22 15:48:22: DELIVERED\n"], ["updated_at", "2015-04-22 12:48:22.492525"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 12:48:22.494025"], ["log", "2015-04-22 15:48:22: ORIGINAL_STATUS\n2015-04-22 15:48:22: DELIVERED\n"], ["updated_at", "2015-04-22 12:48:22.494430"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.4ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 12:48:22.501853"], ["updated_at", "2015-04-22 12:48:22.501853"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_7"], ["created_at", "2015-04-22 12:48:22.503296"], ["updated_at", "2015-04-22 12:48:22.503296"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:48:22.509936' AND '2015-04-22 12:38:22.510085')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:48:22.509936' AND '2015-04-22 12:38:22.510085') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:48:22.509936' AND '2015-04-22 12:38:22.510085')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:48:22.509936' AND '2015-04-22 12:38:22.510085') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:48:22.509936' AND '2015-04-22 12:38:22.510085')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:48:22.509936' AND '2015-04-22 12:38:22.510085') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (9.2ms) Completed 200 OK in 12ms (Views: 10.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 12:48:22.519180"], ["updated_at", "2015-04-22 12:48:22.519180"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 12:48:22.520470"], ["updated_at", "2015-04-22 12:48:22.520470"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (2.6ms) Completed 200 OK in 4ms (Views: 3.5ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_2"], ["created_at", "2015-04-22 12:48:22.528027"], ["updated_at", "2015-04-22 12:48:22.528027"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 12:48:22.529182"], ["updated_at", "2015-04-22 12:48:22.529182"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:48:22.531395' AND '2015-04-22 12:38:22.531463')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:48:22.531395' AND '2015-04-22 12:38:22.531463') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:48:22.531395' AND '2015-04-22 12:38:22.531463')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:48:22.531395' AND '2015-04-22 12:38:22.531463') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:48:22.531395' AND '2015-04-22 12:38:22.531463')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 12:48:22.531395' AND '2015-04-22 12:38:22.531463') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (5.0ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123", "004915112341234", "04917332341111"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123", "004915112341234", "04917332341111"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_existing_dr --------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 13:15:36.280405"], ["log", "2015-04-22 16:15:36: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 13:15:36.282007"], ["updated_at", "2015-04-22 13:15:36.282007"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"102010314204056202", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 13:15:36.292045"], ["log", "2015-04-22 16:15:36: ORIGINAL_STATUS\n2015-04-22 16:15:36: DELIVERED\n"], ["updated_at", "2015-04-22 13:15:36.292606"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 9ms (Views: 2.8ms | ActiveRecord: 0.5ms) ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_dr -------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "wrongid"]] ActionSmser: Gateway_commit not found item with id: wrongid, params: {"msg_id"=>"wrongid", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_admin_access_lambda_with_right_login_info -----------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 13:15:36.301586"], ["updated_at", "2015-04-22 13:15:36.301586"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_6"], ["created_at", "2015-04-22 13:15:36.302701"], ["updated_at", "2015-04-22 13:15:36.302701"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 13:15:36.307917' AND '2015-04-22 13:05:36.308273')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 13:15:36.307917' AND '2015-04-22 13:05:36.308273') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 13:15:36.307917' AND '2015-04-22 13:05:36.308273')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 13:15:36.307917' AND '2015-04-22 13:05:36.308273') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 13:15:36.307917' AND '2015-04-22 13:05:36.308273')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 13:15:36.307917' AND '2015-04-22 13:05:36.308273') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (11.3ms) Completed 200 OK in 13ms (Views: 12.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_with_multiple_records -------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "102010314204056202"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 13:15:36.318268"], ["log", "2015-04-22 16:15:36: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 13:15:36.318676"], ["updated_at", "2015-04-22 13:15:36.318676"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["msg_id", "99999999999999999"], ["status", "ORIGINAL_STATUS"], ["status_updated_at", "2015-04-22 13:15:36.319756"], ["log", "2015-04-22 16:15:36: ORIGINAL_STATUS\n"], ["created_at", "2015-04-22 13:15:36.320034"], ["updated_at", "2015-04-22 13:15:36.320034"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>[{"id"=>"102010314204056202", "status"=>"DELIVERED"}, {"id"=>"99999999999999999", "status"=>"DELIVERED"}]}, "gateway"=>"test_gateway"} ActionSmser: Gateway_commit found parser for gateway: test_gateway ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "102010314204056202"]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 13:15:36.322900"], ["log", "2015-04-22 16:15:36: ORIGINAL_STATUS\n2015-04-22 16:15:36: DELIVERED\n"], ["updated_at", "2015-04-22 13:15:36.324332"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 102010314204056202, params: {"msg_id"=>"102010314204056202", "status"=>"DELIVERED"} ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."msg_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["msg_id", "99999999999999999"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "DELIVERED"], ["status_updated_at", "2015-04-22 13:15:36.325897"], ["log", "2015-04-22 16:15:36: ORIGINAL_STATUS\n2015-04-22 16:15:36: DELIVERED\n"], ["updated_at", "2015-04-22 13:15:36.326231"], ["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Gateway_commit updated item with id: 99999999999999999, params: {"msg_id"=>"99999999999999999", "status"=>"DELIVERED"} Rendered text template (0.0ms) Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 0.6ms) ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_gateway_commit_without_any_parser ---------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}, "gateway"=>"gateway_not_found"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_always_enabled_admin --------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (3.5ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 13:15:36.330913"], ["updated_at", "2015-04-22 13:15:36.330913"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_1"], ["created_at", "2015-04-22 13:15:36.335694"], ["updated_at", "2015-04-22 13:15:36.335694"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#index as HTML  (0.2ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 13:15:36.338934' AND '2015-04-22 13:05:36.339027')  (0.1ms) SELECT COUNT(*) AS count_all, gateway AS gateway FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 13:15:36.338934' AND '2015-04-22 13:05:36.339027') GROUP BY "action_smser_delivery_reports"."gateway"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 13:15:36.338934' AND '2015-04-22 13:05:36.339027')  (0.1ms) SELECT COUNT(*) AS count_all, status AS status FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 13:15:36.338934' AND '2015-04-22 13:05:36.339027') GROUP BY "action_smser_delivery_reports"."status"  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 13:15:36.338934' AND '2015-04-22 13:05:36.339027')  (0.1ms) SELECT COUNT(*) AS count_all, sms_type AS sms_type FROM "action_smser_delivery_reports" WHERE ("action_smser_delivery_reports"."created_at" BETWEEN '2015-04-15 13:15:36.338934' AND '2015-04-22 13:05:36.339027') GROUP BY "action_smser_delivery_reports"."sms_type" Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/index.html.erb within layouts/action_smser/delivery_reports (6.9ms) Completed 200 OK in 8ms (Views: 7.0ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_index_with_forbidden_admin_access_(default_access_mode) -------------------------------------------------------------------------------------------------------- Processing by ActionSmser::DeliveryReportsController#index as HTML Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ActionSmser::DeliveryReportsControllerTest: test_list_with_always_enabled_admin -------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_8"], ["created_at", "2015-04-22 13:15:36.349555"], ["updated_at", "2015-04-22 13:15:36.349555"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("msg_id", "created_at", "updated_at") VALUES (?, ?, ?) [["msg_id", "idtest_4"], ["created_at", "2015-04-22 13:15:36.350841"], ["updated_at", "2015-04-22 13:15:36.350841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ActionSmser::DeliveryReportsController#list as HTML ActionSmser::DeliveryReport Load (0.2ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY created_at DESC LIMIT 20 OFFSET 0 Rendered /home/ohu/koodi/own_gems_programs/action_smser/app/views/action_smser/delivery_reports/list.html.erb within layouts/action_smser/delivery_reports (6.0ms) Completed 200 OK in 7ms (Views: 6.9ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------- ActionSmserTest: test_truth ---------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- ActionSmser::DeliveryReportTest: test_updating_status -----------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("status", "status_updated_at", "log", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["status", "LOCAL_TEST"], ["status_updated_at", "2015-04-22 13:15:36.362383"], ["log", "2015-04-22 16:15:36: LOCAL_TEST\n"], ["created_at", "2015-04-22 13:15:36.362785"], ["updated_at", "2015-04-22 13:15:36.362785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "status" = ?, "status_updated_at" = ?, "log" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["status", "TEST_2"], ["status_updated_at", "2015-04-22 13:15:36.368607"], ["log", "2015-04-22 16:15:36: LOCAL_TEST\n2015-04-22 16:15:36: TEST_2\n"], ["updated_at", "2015-04-22 13:15:36.369001"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_re_deliver_with_simple_http -----------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 13:15:36.370677"], ["log", "2015-04-22 16:15:36: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 13:15:36.371016"], ["updated_at", "2015-04-22 13:15:36.371016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "action_smser_delivery_reports" SET "gateway" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["gateway", "some_delivery"], ["updated_at", "2015-04-22 13:15:36.372730"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Re_delivering: #  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "action_smser_delivery_reports" SET "re_delivered" = ?, "updated_at" = ? WHERE "action_smser_delivery_reports"."id" = ? [["re_delivered", "t"], ["updated_at", "2015-04-22 13:15:36.375529"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]] ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery - From: "555666", To: "123", Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "re_delivery_of_delivery_report_id", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms.re_delivery"], ["re_delivery_of_delivery_report_id", 1], ["to", "123"], ["msg_id", "test_array_id_3107476"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 13:15:36.376878"], ["log", "2015-04-22 16:15:36: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 13:15:36.377208"], ["updated_at", "2015-04-22 13:15:36.377208"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" ORDER BY "action_smser_delivery_reports"."id" DESC LIMIT 1 ActionSmser::DeliveryReport Load (0.1ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."re_delivery_of_delivery_report_id" = ? ORDER BY "action_smser_delivery_reports"."id" ASC LIMIT 1 [["re_delivery_of_delivery_report_id", 1]] ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- ActionSmser::DeliveryReportTest: test_build_DeliveryReport_from_sms -------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::DeliveryReportTest: test_create_from_save ------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 13:15:36.386770"], ["log", "2015-04-22 16:15:36: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 13:15:36.387125"], ["updated_at", "2015-04-22 13:15:36.387125"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- ActionSmser::DeliveryReportTest: test_to_sms --------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::DeliveryReportTest::MockSms.basic_sms"], ["to", "123"], ["msg_id", "msg_id_a"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 13:15:36.389048"], ["log", "2015-04-22 16:15:36: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 13:15:36.389810"], ["updated_at", "2015-04-22 13:15:36.389810"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser::DeliveryReport Load (0.0ms) SELECT "action_smser_delivery_reports".* FROM "action_smser_delivery_reports" WHERE "action_smser_delivery_reports"."id" = ? LIMIT 1 [["id", 1]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------ ActionSmser::SmstradeTest: test_with_saving_delivery_reports ------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (17.3ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "004915112341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 13:15:36.394557"], ["log", "2015-04-22 16:15:36: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 13:15:36.394895"], ["updated_at", "2015-04-22 13:15:36.394895"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "4917212341234"], ["body", "Body with ümläüts."], ["sms_type", "ActionSmser::SmstradeTest::MockSms.basic_sms"], ["to", "004917812341234"], ["msg_id", "123456789"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 13:15:36.413931"], ["log", "2015-04-22 16:15:36: LOCAL_SENT\n"], ["gateway", "smstrade"], ["created_at", "2015-04-22 13:15:36.414268"], ["updated_at", "2015-04-22 13:15:36.414268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- ActionSmser::SmstradeTest: test_should_append_00_to_phone_numbers_before_sending -------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::SmstradeTest: test_should_be_able_to_deliver --------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: smstrade - Sms: (Sms ActionSmser::SmstradeTest::MockSms.basic_sms - From: "4917212341234", To: ["4915112341234", "4917812341234"], Body: "Body with ümläüts.", Valid: true) ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004915112341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1 ActionSmser: Smstrade delivery http ||| /?key=api-key-here&from=4917212341234&to=004917812341234&message=Body+with+%C3%BCml%C3%A4%C3%BCts.&route=gold&debug=1&cost=1&message_id=1&count=1&charset=utf-8 ||| # ActionSmser: 100 123456789 0.064 1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------- ActionSmser::SmstradeTest: test_should_only_receive_numbers_not_prepended_with_zeros_or_plus_signs --------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- ActionSmser::DelayedJobTest: test_should_be_able_to_deliver_and_call_enqueue_for_all_receivers ---------------------------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: delayed_job - Sms: (Sms ActionSmser::DelayedJobTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Delivering sms by delayed_job  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::DelayedJobTest: test_test_that_serializing_is_ok -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- NavigationTest: test_basic_gateway_commit_delivery_report --------------------------------------------------------- Started GET "/action_smser/delivery_reports/gateway_commit/example_gateway" for 127.0.0.1 at 2015-04-22 16:15:36 +0300 Processing by ActionSmser::DeliveryReportsController#gateway_commit as HTML Parameters: {"gateway"=>"example_gateway"} Rendered text template (0.0ms) Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ActionSmser::TestArrayTest: test_with_saving_delivery_reports ------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "test_array_id_13804019"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 13:15:36.429251"], ["log", "2015-04-22 16:15:36: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 13:15:36.429647"], ["updated_at", "2015-04-22 13:15:36.429647"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::TestArrayTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "test_array_id_31859348"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 13:15:36.430876"], ["log", "2015-04-22 16:15:36: LOCAL_SENT\n"], ["gateway", "test_array"], ["created_at", "2015-04-22 13:15:36.431244"], ["updated_at", "2015-04-22 13:15:36.431244"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ActionSmser::TestArrayTest: test_should_add_to_TestArray -------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------- ActionSmser::TestArrayTest: test_should_be_able_to_deliver ---------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::TestArrayTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- ActionSmser::BaseTest: test_before_delivery_should_be_called_if_it's_present ---------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123", "004915112341234", "04917332341111"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_test_array_as_delivery_method ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_should_not_be_valid_if_no_recipients ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_cropped_to_500_chars,_limit_extra_looong_messages --------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_crop_should_return_cropped_message_with_sms_chars_taken_account --------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_body_should_be_possible_to_encode -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::BaseTest: test_should_be_ok_with_single_receivers --------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ActionSmser::BaseTest: test_ttl_should_be_24_hours_by_default -------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- ActionSmser::BaseTest: test_receivers_should_be_joined_by_commas ----------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ActionSmser::BaseTest: test_should_be_able_to_change_ttl --------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- ActionSmser::BaseTest: test_message_real_length_should_return_real_sms_lenght -----------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- ActionSmser::BaseTest: test_should_have_copied_the_delivery_options_when_initializing -------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------- ActionSmser::BaseTest: test_after_delivery_should_be_called_if_it's_present --------------------------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: test_array - Sms: (Sms ActionSmser::BaseTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123", "+358123555123", "004915112341234", "04917332341111"], Body: "Body with ääkköset end", Valid: true) ActionSmser: ActionSmser::DeliveryMethods::TestArray.deliveries added message, no real delivery.  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------- ActionSmser::BaseTest: test_should_be_valid_sms -----------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------- ActionSmser::BaseTest: test_from_encoded_should_remove_leading_+_and_0 ----------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ ActionSmser::BaseTest: test_should_have_saved_sms_type ------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ActionSmser::NexmoTest: test_gateway_process_delivery_report(request) ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ ActionSmser::NexmoTest: test_delivery_path_should_have_unicode_set_when_needed ------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ ActionSmser::NexmoTest: test_should_be_able_to_deliver ------------------------------------------------------ ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]} ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=false&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- ActionSmser::NexmoTest: test_with_saving_delivery_reports ---------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: nexmo - Sms: (Sms ActionSmser::NexmoTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=555123555&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 13:15:36.451780"], ["log", "2015-04-22 16:15:36: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 13:15:36.452199"], ["updated_at", "2015-04-22 13:15:36.452199"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActionSmser: Nexmo delivery http ||| /sms/json?username=user&password=pass&ttl=86400000&status-report-req=true&from=555666&to=123555123&text=Body+with+%C3%A4%C3%A4kk%C3%B6set+end ||| # ActionSmser: {"message-count":"1","messages":[{"message-price":"0.02500000","status":"0","message-id":"0778DE88","remaining-balance":"1.77500000"}]}  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::NexmoTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "0778DE88"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 13:15:36.453526"], ["log", "2015-04-22 16:15:36: LOCAL_SENT\n"], ["gateway", "nexmo"], ["created_at", "2015-04-22 13:15:36.453874"], ["updated_at", "2015-04-22 13:15:36.453874"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- ActionSmser::SimpleHttpTest: test_should_be_able_to_deliver ----------------------------------------------------------- ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- ActionSmser::SimpleHttpTest: test_with_saving_delivery_reports --------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "action_smser_delivery_reports" ActionSmser: Sending sms - Delivery_method: simple_http - Sms: (Sms ActionSmser::SimpleHttpTest::MockSms.basic_sms - From: "555666", To: ["555123555", "123555123"], Body: "Body with ääkköset end", Valid: true) ActionSmser: SimpleHttp delivery ||| /api/sendsms/plain?user=user&password=pass&sender=555666&SMSText=Body+with+%E4%E4kk%F6set+end&GSM=555123555,123555123 ||| # ActionSmser: id_1234 id_6666  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "555123555"], ["msg_id", "id_1234"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 13:15:36.459145"], ["log", "2015-04-22 16:15:36: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 13:15:36.459591"], ["updated_at", "2015-04-22 13:15:36.459591"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "action_smser_delivery_reports" ("from", "body", "sms_type", "to", "msg_id", "status", "status_updated_at", "log", "gateway", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["from", "555666"], ["body", "Body with ääkköset end"], ["sms_type", "ActionSmser::SimpleHttpTest::MockSms.basic_sms"], ["to", "123555123"], ["msg_id", "id_6666"], ["status", "LOCAL_SENT"], ["status_updated_at", "2015-04-22 13:15:36.460824"], ["log", "2015-04-22 16:15:36: LOCAL_SENT\n"], ["gateway", "simple_http"], ["created_at", "2015-04-22 13:15:36.461164"], ["updated_at", "2015-04-22 13:15:36.461164"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "action_smser_delivery_reports"  (0.1ms) rollback transaction