ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.6ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$gFBHKvOBwETVvEIrdBlzPOvTH.D7rnf1ps.eYQJlZQRMGgmBTiosq', '2015-11-08 12:41:32', '2015-11-08 12:41:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$flTP6UNFTOcZJNHuhRzQKuBi4aUx2/hGCUH2y6gg0MXp98G4BmiWy', '2015-11-08 12:41:32', '2015-11-08 12:41:32', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-11-08 12:41:32', '2015-11-08 12:41:32', 980190962)  (0.7ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.6ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-11-08 12:41:32.287223"], ["updated_at", "2015-11-08 12:41:32.287223"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-08 12:41:29.258967') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-08 12:41:29.258967') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (1.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-11-08 12:41:32.300759"], ["updated_at", "2015-11-08 12:41:32.300759"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-08 12:41:29.294008') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-08 12:41:29.294008') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-11-08 12:41:32.306699"], ["updated_at", "2015-11-08 12:41:32.306699"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-08 12:41:29.304965') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-08 12:41:29.304965') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-11-08 12:41:32.313946"], ["updated_at", "2015-11-08 12:41:32.313946"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-08 12:41:29.311979') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-11-08 12:41:32.319949"], ["updated_at", "2015-11-08 12:41:32.319949"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-08 12:41:29.317689') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-08 12:41:29.317689') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-08 12:41:29.318456') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-08 12:41:29.318456') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "admins" Fixture Insert (0.7ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$D9GOC6wn5jhzXRISVRJJkeq1ZoqCKUlaGcGcdkqgnmshQymoYpWsO', '2015-11-11 19:50:57', '2015-11-11 19:50:57', 980190962) Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$AJPkDnEDfVFUDf52f2QEVukTBZD9v9nLd6kiCvc4YnpLXhRXQUeTG', '2015-11-11 19:50:57', '2015-11-11 19:50:57', 298486374) Fixture Delete (0.6ms) DELETE FROM "articles" Fixture Insert (0.4ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-11-11 19:50:57', '2015-11-11 19:50:57', 980190962)  (1.0ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-11-11 19:50:57.921342"], ["updated_at", "2015-11-11 19:50:57.921342"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-11 19:50:54.873388') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-11 19:50:54.873388') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (1.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "loco_notifications" ("event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-11-11 19:50:57.934790"], ["updated_at", "2015-11-11 19:50:57.934790"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-11 19:50:54.930692') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-11 19:50:54.930692') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-11-11 19:50:57.949961"], ["updated_at", "2015-11-11 19:50:57.949961"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-11 19:50:54.946237') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-11 19:50:54.946237') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-11 19:50:54.947309') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-11 19:50:54.947309') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-11-11 19:50:57.960926"], ["updated_at", "2015-11-11 19:50:57.960926"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-11 19:50:54.957869') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-11-11 19:50:57.970240"], ["updated_at", "2015-11-11 19:50:57.970240"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-11 19:50:54.965837') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-11 19:50:54.965837') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$v4y1JPqChabkfB2ITjDSvuVp/ty8fhFAi7L/mH3nNquRuwXYLKCJa', '2015-11-19 22:33:34', '2015-11-19 22:33:34', 980190962) Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$4rnd4E7GPwLzrCOn20KtZeuAAe2siOc3qyB2fI1wlJSTKuV4DGq32', '2015-11-19 22:33:34', '2015-11-19 22:33:34', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-11-19 22:33:34', '2015-11-19 22:33:34', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.4ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-11-19 22:33:34.335178"], ["updated_at", "2015-11-19 22:33:34.335178"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-19 22:33:31.295375') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-19 22:33:31.295375') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-11-19 22:33:34.350483"], ["updated_at", "2015-11-19 22:33:34.350483"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-19 22:33:31.347145') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-11-19 22:33:34.357744"], ["updated_at", "2015-11-19 22:33:34.357744"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-19 22:33:31.354778') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-19 22:33:31.354778') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-11-19 22:33:34.366583"], ["updated_at", "2015-11-19 22:33:34.366583"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-19 22:33:31.363015') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-19 22:33:31.363015') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-19 22:33:31.364048') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-19 22:33:31.364048') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-11-19 22:33:34.376645"], ["updated_at", "2015-11-19 22:33:34.376645"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-19 22:33:31.374419') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-19 22:33:31.374419') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$LdLK633vlAoMjhAogDSLn.2vDp2GaiX0nR1o4Z1rpA7lBn8IUPBSe', '2015-11-29 00:04:26', '2015-11-29 00:04:26', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$Bsuk19BMdYOGuGiY3M431e9jdF9eQNTAixXVrYkVOu62FH.PtJwJq', '2015-11-29 00:04:26', '2015-11-29 00:04:26', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-11-29 00:04:26', '2015-11-29 00:04:26', 980190962)  (0.7ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-11-29 00:04:26.990917"], ["updated_at", "2015-11-29 00:04:26.990917"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-29 00:04:23.954681') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-29 00:04:23.954681') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (1.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-11-29 00:04:27.004068"], ["updated_at", "2015-11-29 00:04:27.004068"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-29 00:04:23.999569') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-29 00:04:23.999569') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-11-29 00:04:27.011058"], ["updated_at", "2015-11-29 00:04:27.011058"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-29 00:04:24.008624') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-29 00:04:24.008624') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-29 00:04:24.009391') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-29 00:04:24.009391') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-11-29 00:04:27.021307"], ["updated_at", "2015-11-29 00:04:27.021307"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-29 00:04:24.017893') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-11-29 00:04:27.026595"], ["updated_at", "2015-11-29 00:04:27.026595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-29 00:04:24.025200') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-11-29 00:04:24.025200') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$u4u1JaswCy/houLi.i1mKurSeulyGS.R8ORSV7Ul5o8fubrEn04VG', '2015-12-30 21:26:12', '2015-12-30 21:26:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$QtP2B.8ru3tdMSjvwjupYO36G.DONaL71ptEU/Assq4xg4xc42vGS', '2015-12-30 21:26:12', '2015-12-30 21:26:12', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 21:26:12', '2015-12-30 21:26:12', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 21:26:12.389955"], ["updated_at", "2015-12-30 21:26:12.389955"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:26:09.360727') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.6ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:26:09.360727') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (1.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 21:26:12.417780"], ["updated_at", "2015-12-30 21:26:12.417780"]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:26:09.401628') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:26:09.401628') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:26:09.406182') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:26:09.406182') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:26:12.427815"], ["updated_at", "2015-12-30 21:26:12.427815"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.5ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:26:09.425373') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:26:09.425373') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:26:12.437946"], ["updated_at", "2015-12-30 21:26:12.437946"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:26:09.435324') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 21:26:12.444832"], ["updated_at", "2015-12-30 21:26:12.444832"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:26:09.441910') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:26:09.441910') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$qv9.jdoIdy1gXbVjId89sOljdvgMSeqDZ/JzTy/fR0bRuMViqhVgq', '2015-12-30 21:32:21', '2015-12-30 21:32:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$MWL83s7g3ooORrhUalpBGeFKGHOzawAnk6nNZqyxWsbVHSHH/.chG', '2015-12-30 21:32:21', '2015-12-30 21:32:21', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 21:32:21', '2015-12-30 21:32:21', 980190962)  (1.2ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:32:21.978455"], ["updated_at", "2015-12-30 21:32:21.978455"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:32:18.944984') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:32:18.944984') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 21:32:21.990069"], ["updated_at", "2015-12-30 21:32:21.990069"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:32:18.987521') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:32:18.987521') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:32:18.988381') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:32:18.988381') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:32:21.999006"], ["updated_at", "2015-12-30 21:32:21.999006"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:32:18.997051') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 21:32:22.005435"], ["updated_at", "2015-12-30 21:32:22.005435"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:32:19.002672') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:32:19.002672') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 21:32:22.012927"], ["updated_at", "2015-12-30 21:32:22.012927"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:32:19.011289') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:32:19.011289') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.6ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$QWiZd5vJtvoscROxSajhte4o2TgjnbdXgl5hr9u64x9p5fTbNul3G', '2015-12-30 21:33:48', '2015-12-30 21:33:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$WtUByIeIASWI53twpVfHMegV4tAoYp1I8ebexMVarSedig099L1ce', '2015-12-30 21:33:48', '2015-12-30 21:33:48', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 21:33:48', '2015-12-30 21:33:48', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.5ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 21:33:48.905502"], ["updated_at", "2015-12-30 21:33:48.905502"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:33:45.872634') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:33:45.872634') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:33:48.923719"], ["updated_at", "2015-12-30 21:33:48.923719"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:33:45.921410') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:33:45.921410') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 21:33:48.930427"], ["updated_at", "2015-12-30 21:33:48.930427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:33:45.928601') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:33:45.928601') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:33:48.937798"], ["updated_at", "2015-12-30 21:33:48.937798"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:33:45.935757') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 21:33:48.944761"], ["updated_at", "2015-12-30 21:33:48.944761"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:33:45.941821') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:33:45.941821') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:33:45.942885') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:33:45.942885') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Started GET "/" for 127.0.0.1 at 2015-12-30 22:33:49 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.6ms) Completed 500 Internal Server Error in 461ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$rNfljEih4VSLF/yrS2R3FOcfUDhFQ.hhKVhzSmOGataRrKc/t.Hre', '2015-12-30 21:36:38', '2015-12-30 21:36:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$WJpl3IqmSbGBlWiFwNKpI.m5aNgnsFTsDF58uvqI8cMep6rP7lIzi', '2015-12-30 21:36:38', '2015-12-30 21:36:38', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 21:36:38', '2015-12-30 21:36:38', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Started GET "/" for 127.0.0.1 at 2015-12-30 22:36:38 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.8ms) Completed 500 Internal Server Error in 413ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:36:39.322657"], ["updated_at", "2015-12-30 21:36:39.322657"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:36:36.292653') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:36:36.292653') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 21:36:39.333818"], ["updated_at", "2015-12-30 21:36:39.333818"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:36:36.329553') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:36:36.329553') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:36:36.330608') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:36:36.330608') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 21:36:39.342877"], ["updated_at", "2015-12-30 21:36:39.342877"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:36:36.340600') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:36:36.340600') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:36:39.351345"], ["updated_at", "2015-12-30 21:36:39.351345"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:36:36.347574') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 21:36:39.356919"], ["updated_at", "2015-12-30 21:36:39.356919"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:36:36.355287') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:36:36.355287') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$lASBDunmPD5mLxz3gAfbwOSVKsKPtqLYmEotNe9zcgp.XCFJaxT/W', '2015-12-30 21:39:46', '2015-12-30 21:39:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$9R6G89t4y9zTWHcooYGrKOAdSN6bBKmFUYDxtycso8PKjEEilsQT6', '2015-12-30 21:39:46', '2015-12-30 21:39:46', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 21:39:46', '2015-12-30 21:39:46', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Started GET "/" for 127.0.0.1 at 2015-12-30 22:39:47 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (4.3ms) Completed 500 Internal Server Error in 415ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:39:47.510815"], ["updated_at", "2015-12-30 21:39:47.510815"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:39:44.481969') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:39:44.481969') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 21:39:47.521703"], ["updated_at", "2015-12-30 21:39:47.521703"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:39:44.517776') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:39:44.517776') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:39:44.518704') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:39:44.518704') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:39:47.531195"], ["updated_at", "2015-12-30 21:39:47.531195"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:39:44.529168') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.9ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 21:39:47.537433"], ["updated_at", "2015-12-30 21:39:47.537433"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:39:44.535493') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:39:44.535493') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 21:39:47.544877"], ["updated_at", "2015-12-30 21:39:47.544877"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:39:44.542378') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:39:44.542378') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "admins" Fixture Insert (0.7ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$NZaIcBcE3aKIZnOtW084F.GrnTS2J.EvGZ5EKUXn9AmfEK6NId.Qi', '2015-12-30 21:49:10', '2015-12-30 21:49:10', 980190962) Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$5.u1cBdZM2cFVHURGrZh0OO1JaxuyACMtu4My5Q7HcYi1LuMCLuGG', '2015-12-30 21:49:10', '2015-12-30 21:49:10', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 21:49:10', '2015-12-30 21:49:10', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Started GET "/" for 127.0.0.1 at 2015-12-30 22:49:10 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.6ms) Completed 500 Internal Server Error in 448ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.2ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 21:49:11.000854"], ["updated_at", "2015-12-30 21:49:11.000854"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:49:07.957619') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:49:07.957619') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:49:11.013601"], ["updated_at", "2015-12-30 21:49:11.013601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:49:08.009391') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 21:49:11.021512"], ["updated_at", "2015-12-30 21:49:11.021512"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:49:08.019062') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:49:08.019062') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 21:49:11.034868"], ["updated_at", "2015-12-30 21:49:11.034868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:49:08.029846') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:49:08.029846') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:49:08.031271') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:49:08.031271') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:49:11.049036"], ["updated_at", "2015-12-30 21:49:11.049036"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:49:08.045131') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:49:08.045131') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.2ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$82fdxlAneel3.mSjzpg6euP9ydnVEy0yAu9EjId.QVbn99Y4OQQpi', '2015-12-30 21:56:18', '2015-12-30 21:56:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$6ZlfuezMLJFpVWkL2QvUEusxAEOKnrZPdVaDIueFATe9Mru5KyMGq', '2015-12-30 21:56:18', '2015-12-30 21:56:18', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 21:56:18', '2015-12-30 21:56:18', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 21:56:18.953643"], ["updated_at", "2015-12-30 21:56:18.953643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:56:15.924635') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:56:15.924635') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 21:56:18.965184"], ["updated_at", "2015-12-30 21:56:18.965184"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:56:15.962207') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:56:15.962207') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:56:15.963119') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:56:15.963119') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 21:56:18.973484"], ["updated_at", "2015-12-30 21:56:18.973484"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:56:15.972040') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:56:15.972040') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:56:18.980073"], ["updated_at", "2015-12-30 21:56:18.980073"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:56:15.978140') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:56:18.986126"], ["updated_at", "2015-12-30 21:56:18.986126"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:56:15.984191') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:56:15.984191') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Started GET "/" for 127.0.0.1 at 2015-12-30 22:56:19 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.6ms) Rendered layouts/_flash.html.erb (1.3ms) Completed 200 OK in 11372ms (Views: 11361.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$BeVIqo9b6KQiGyatQ5uf/.MEcSgIPT0Llysp6YlBkGlwjorhIqHIq', '2015-12-30 21:58:59', '2015-12-30 21:58:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$6phmFLDY7RqQDZEY8rzRT.he1J3FVdV7Ezsj2HBKvvCkahVVn9RN2', '2015-12-30 21:58:59', '2015-12-30 21:58:59', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 21:58:59', '2015-12-30 21:58:59', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.4ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:58:59.130045"], ["updated_at", "2015-12-30 21:58:59.130045"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:58:56.096950') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:58:56.096950') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 21:58:59.141976"], ["updated_at", "2015-12-30 21:58:59.141976"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:58:56.139342') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:58:56.139342') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:58:56.140268') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:58:56.140268') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 21:58:59.150397"], ["updated_at", "2015-12-30 21:58:59.150397"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:58:56.148932') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:58:56.148932') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 21:58:59.157507"], ["updated_at", "2015-12-30 21:58:59.157507"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:58:56.155129') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:58:56.155129') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 21:58:59.164050"], ["updated_at", "2015-12-30 21:58:59.164050"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 21:58:56.161617') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Started GET "/" for 127.0.0.1 at 2015-12-30 22:58:59 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.6ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 514ms (Views: 501.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (2.6ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$8nDFEL66f8cfCnBAointEu98K3oJM1e9cu9EPwB3cgMVua1QLhFlC', '2015-12-30 22:02:24', '2015-12-30 22:02:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$e6gtMz0JdsZIeEM51cbW0em1IFdbg9O0evM2byMzHhyBSFrrVdXTC', '2015-12-30 22:02:24', '2015-12-30 22:02:24', 298486374) Fixture Delete (0.5ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 22:02:24', '2015-12-30 22:02:24', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 22:02:24.437327"], ["updated_at", "2015-12-30 22:02:24.437327"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:21.404748') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:21.404748') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:02:24.447634"], ["updated_at", "2015-12-30 22:02:24.447634"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:21.445087') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:21.445087') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 22:02:24.455422"], ["updated_at", "2015-12-30 22:02:24.455422"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:21.452777') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:21.452777') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:21.453649') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:21.453649') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:02:24.464416"], ["updated_at", "2015-12-30 22:02:24.464416"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:21.461568') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 22:02:24.469660"], ["updated_at", "2015-12-30 22:02:24.469660"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:21.468022') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:21.468022') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Started GET "/" for 127.0.0.1 at 2015-12-30 23:02:24 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.4ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 503ms (Views: 490.2ms | ActiveRecord: 0.0ms)  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.1ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$wAJvxwMBtK/I5tB34.zX1OFv.ojGRtd.4HV.S6OloyLi6AA1M1l8e', '2015-12-30 22:02:57', '2015-12-30 22:02:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$zK7mm1v7YsHpDi3x7nRDb.fzzLUM/2l5q.nD0/KH1yQBhmQRw.pE.', '2015-12-30 22:02:57', '2015-12-30 22:02:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 22:02:57', '2015-12-30 22:02:57', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Started GET "/" for 127.0.0.1 at 2015-12-30 23:02:57 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.9ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 521ms (Views: 510.5ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.2ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (1.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 22:02:57.929503"], ["updated_at", "2015-12-30 22:02:57.929503"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.7ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:54.877465') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.7ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:54.877465') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.7ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (1.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 SQL (3.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:02:58.194203"], ["updated_at", "2015-12-30 22:02:58.194203"]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (5.5ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:55.120822') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.7ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (1.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 22:02:58.262571"], ["updated_at", "2015-12-30 22:02:58.262571"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (1.7ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:55.217965') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (3.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:55.217965') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.8ms) rollback transaction  (1.3ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.4ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:02:58.337357"], ["updated_at", "2015-12-30 22:02:58.337357"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:55.319297') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:55.319297') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 22:02:58.383758"], ["updated_at", "2015-12-30 22:02:58.383758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.6ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:55.374941') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:55.374941') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:55.378906') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:02:55.378906') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$Gd5wkdaY1rKPIfT8wTWP5.ewXzZJFH4tUB2Oe7afNjZNWzq3POta.', '2015-12-30 22:03:35', '2015-12-30 22:03:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$VKDtNCDm.C8K9HlKQRgxlexDo3VeKG7l0d8coGpaAsdCiROosz/Pe', '2015-12-30 22:03:35', '2015-12-30 22:03:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 22:03:35', '2015-12-30 22:03:35', 980190962)  (752.1ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Started GET "/" for 127.0.0.1 at 2015-12-30 23:03:35 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.0ms) Rendered layouts/_flash.html.erb (1.3ms) Completed 200 OK in 443ms (Views: 430.2ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.6ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.7ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 22:03:36.680335"], ["updated_at", "2015-12-30 22:03:36.680335"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.8ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:03:33.572033') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:03:33.572033') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 22:03:36.723931"], ["updated_at", "2015-12-30 22:03:36.723931"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:03:33.706630') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.7ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:03:33.706630') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (5.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:03:33.718614') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.8ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:03:33.718614') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:03:36.763515"], ["updated_at", "2015-12-30 22:03:36.763515"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (8.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:03:33.757472') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.8ms) rollback transaction  (1.9ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 22:03:36.794668"], ["updated_at", "2015-12-30 22:03:36.794668"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:03:33.791619') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.9ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:03:33.791619') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.8ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:03:36.813766"], ["updated_at", "2015-12-30 22:03:36.813766"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (1.8ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:03:33.808173') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:03:33.808173') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$/RvhKOIQhDSJNdgs.QxEmuYBgJPcIOv9yc6tV89cS.4nhSb3BoiTK', '2015-12-30 22:04:24', '2015-12-30 22:04:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$8VhD1BKuPflCGBqFlDV2TuxVjMTwapEWu8dFgI1ZJ9aRCg3erUhUm', '2015-12-30 22:04:24', '2015-12-30 22:04:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 22:04:24', '2015-12-30 22:04:24', 980190962)  (2.9ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction  (0.2ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Started GET "/" for 127.0.0.1 at 2015-12-30 23:04:24 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (1.9ms) Rendered layouts/_flash.html.erb (1.1ms) Completed 200 OK in 434ms (Views: 422.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 22:04:24.614510"], ["updated_at", "2015-12-30 22:04:24.614510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:04:21.560900') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:04:21.560900') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:04:21.578910') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:04:21.578910') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (1.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 22:04:24.636457"], ["updated_at", "2015-12-30 22:04:24.636457"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:04:21.631086') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:04:21.631086') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:04:24.644433"], ["updated_at", "2015-12-30 22:04:24.644433"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:04:21.642487') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:04:21.642487') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 22:04:24.650283"], ["updated_at", "2015-12-30 22:04:24.650283"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:04:21.648845') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:04:21.648845') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:04:24.658188"], ["updated_at", "2015-12-30 22:04:24.658188"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:04:21.655797') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$7bea0iAHaOU/8R3NdGNh3uzaid6Es7t8Ij9y5jr.ZXX3MVozr6V3e', '2015-12-30 22:13:41', '2015-12-30 22:13:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$rKUOo1iohFZ2IS6vkroGZunFICRsTo99YPtYtmZ/cf5qhrEjqNt..', '2015-12-30 22:13:41', '2015-12-30 22:13:41', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 22:13:41', '2015-12-30 22:13:41', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Started GET "/" for 127.0.0.1 at 2015-12-30 23:13:41 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.5ms) Rendered layouts/_flash.html.erb (1.1ms) Completed 200 OK in 540ms (Views: 528.4ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.4ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 22:13:42.320471"], ["updated_at", "2015-12-30 22:13:42.320471"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:13:39.274172') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:13:39.274172') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 22:13:42.336714"], ["updated_at", "2015-12-30 22:13:42.336714"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:13:39.329176') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:13:39.329176') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:13:42.345510"], ["updated_at", "2015-12-30 22:13:42.345510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:13:39.343225') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:13:39.343225') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:13:42.353959"], ["updated_at", "2015-12-30 22:13:42.353959"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:13:39.351543') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 22:13:42.360659"], ["updated_at", "2015-12-30 22:13:42.360659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:13:39.357885') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:13:39.357885') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:13:39.358762') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:13:39.358762') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.4ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$lXAjZ/tcBXrdqutRAdo0O..rvYR3bpTBQ40aM4T/iBR6REBvdvaz.', '2015-12-30 22:16:14', '2015-12-30 22:16:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$FzyUnsmoBZ.bttLEhkgJf.5FhTHF3mPpSqAbrmgILE3D6zFzo15Ue', '2015-12-30 22:16:14', '2015-12-30 22:16:14', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 22:16:14', '2015-12-30 22:16:14', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 22:16:14.100215"], ["updated_at", "2015-12-30 22:16:14.100215"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:11.067026') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:11.067026') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 22:16:14.110910"], ["updated_at", "2015-12-30 22:16:14.110910"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:11.108386') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:11.108386') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:11.109223') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:11.109223') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 22:16:14.119308"], ["updated_at", "2015-12-30 22:16:14.119308"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:11.117852') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:11.117852') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:16:14.126731"], ["updated_at", "2015-12-30 22:16:14.126731"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:11.123852') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:11.123852') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:16:14.134001"], ["updated_at", "2015-12-30 22:16:14.134001"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:11.131932') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------  (0.1ms) SELECT COUNT(*) FROM "articles" Started GET "/" for 127.0.0.1 at 2015-12-30 23:16:14 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.6ms) Rendered layouts/_flash.html.erb (1.3ms) Completed 200 OK in 529ms (Views: 517.3ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.6ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$W9RQNPp3/gmnxNC7rUuMB.fFDx/WKDLblnaECQ4aUSqu2Vc7njF2K', '2015-12-30 22:16:39', '2015-12-30 22:16:39', 980190962) Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$PQHYGYDDyLuMVnc.MMJSQ.aOl63Xk1qrNNpnYheOQ3VppbfJCyopi', '2015-12-30 22:16:39', '2015-12-30 22:16:39', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 22:16:39', '2015-12-30 22:16:39', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 22:16:39.665016"], ["updated_at", "2015-12-30 22:16:39.665016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:36.634169') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:36.634169') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:36.643990') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:36.643990') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 22:16:39.676534"], ["updated_at", "2015-12-30 22:16:39.676534"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:36.675007') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:36.675007') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 22:16:39.684415"], ["updated_at", "2015-12-30 22:16:39.684415"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:36.681985') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:36.681985') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:16:39.690896"], ["updated_at", "2015-12-30 22:16:39.690896"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:36.688806') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:16:39.697031"], ["updated_at", "2015-12-30 22:16:39.697031"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:36.695125') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:16:36.695125') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction  (0.2ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.3ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 22:16:39.706666"], ["updated_at", "2015-12-30 22:16:39.707437"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-30 23:16:39 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.9ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 527ms (Views: 516.0ms | ActiveRecord: 0.0ms)  (0.8ms) rollback transaction ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "admins" Fixture Insert (0.6ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$ZKLCrPJEH1mXbr8tfReQ/eze8B9DGWrBg4r531GEKCPXQidL/5f1y', '2015-12-30 22:21:28', '2015-12-30 22:21:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$JND9Z24acZR/4fpuNWaJfeZEQxA9/5FcrYKwerNlkNECdmW8vP8I2', '2015-12-30 22:21:28', '2015-12-30 22:21:28', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 22:21:28', '2015-12-30 22:21:28', 980190962)  (1.3ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 22:21:28.408473"], ["updated_at", "2015-12-30 22:21:28.411831"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-30 23:21:28 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.6ms) Rendered layouts/_flash.html.erb (1.1ms) Completed 200 OK in 520ms (Views: 508.7ms | ActiveRecord: 0.0ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (1.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (2.1ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 22:21:29.142107"], ["updated_at", "2015-12-30 22:21:29.142107"]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (1.9ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:21:26.121149') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.7ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:21:26.121149') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.6ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:21:29.169535"], ["updated_at", "2015-12-30 22:21:29.169535"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:21:26.159446') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:21:26.159446') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:21:29.184235"], ["updated_at", "2015-12-30 22:21:29.184235"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:21:26.179937') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.5ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (2.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 22:21:29.210633"], ["updated_at", "2015-12-30 22:21:29.210633"]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:21:26.203090') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:21:26.203090') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (5.9ms) rollback transaction  (0.3ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 22:21:29.259859"], ["updated_at", "2015-12-30 22:21:29.259859"]]  (2.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:21:26.253352') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:21:26.253352') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:21:26.255463') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.5ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:21:26.255463') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$lZ7kTcLNFKc8tJe0ByuEc.k4DDjuqD/lEL8tRAP6JjL.CYrNKBzVS', '2015-12-30 22:23:25', '2015-12-30 22:23:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$CqviqJ3mHyy03oDtiBaSgeOvq10LJK.dt4yXR8oTW5S8z4WJVLI9i', '2015-12-30 22:23:25', '2015-12-30 22:23:25', 298486374) Fixture Delete (0.7ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 22:23:25', '2015-12-30 22:23:25', 980190962)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:23:25.748412"], ["updated_at", "2015-12-30 22:23:25.748412"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:22.721330') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:23:25.757522"], ["updated_at", "2015-12-30 22:23:25.757522"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:22.755336') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:22.755336') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 22:23:25.765428"], ["updated_at", "2015-12-30 22:23:25.765428"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:22.762700') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:22.762700') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 22:23:25.772418"], ["updated_at", "2015-12-30 22:23:25.772418"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:22.769833') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:22.769833') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:22.770619') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:22.770619') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 22:23:25.781309"], ["updated_at", "2015-12-30 22:23:25.781309"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:22.779735') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:22.779735') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 22:23:25.792736"], ["updated_at", "2015-12-30 22:23:25.793436"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-30 23:23:25 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.4ms) Rendered layouts/_flash.html.erb (1.4ms) Completed 200 OK in 520ms (Views: 505.6ms | ActiveRecord: 0.0ms)  (0.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$0aBLU4gVjH1FdBlYDbRRN.hE8YN7y4/sMDFjD6nIbOf.UXZJ6T4yu', '2015-12-30 22:23:51', '2015-12-30 22:23:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$Lw7QZndDgOhHEww7zAwhDOxNZH1poB0oRuN3UQxX4KlM22UBTCd1a', '2015-12-30 22:23:51', '2015-12-30 22:23:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 22:23:51', '2015-12-30 22:23:51', 980190962)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 22:23:51.215302"], ["updated_at", "2015-12-30 22:23:51.220233"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-30 23:23:51 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (4.4ms) Rendered layouts/_flash.html.erb (1.1ms) Completed 200 OK in 533ms (Views: 522.6ms | ActiveRecord: 0.0ms)  (1.4ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 22:23:51.865788"], ["updated_at", "2015-12-30 22:23:51.865788"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:48.846383') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:48.846383') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 22:23:51.890449"], ["updated_at", "2015-12-30 22:23:51.890449"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:48.876791') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:48.876791') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:23:51.899276"], ["updated_at", "2015-12-30 22:23:51.899276"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:48.897210') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:48.897210') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:23:51.906413"], ["updated_at", "2015-12-30 22:23:51.906413"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:48.904225') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 22:23:51.913741"], ["updated_at", "2015-12-30 22:23:51.913741"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:48.910110') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:48.910110') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:48.911049') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:23:48.911049') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (5.2ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$OUfE.WbBa8RXQDrq6xS2tOmIGAddhF.FIuF3JlHlrABAp6aq4LQmK', '2015-12-30 22:24:38', '2015-12-30 22:24:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$a3Xd4XLivO3JpQ7QYUCVx.rPV181K9sDEM9Ur4inUQNVuxlddWg9W', '2015-12-30 22:24:38', '2015-12-30 22:24:38', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 22:24:38', '2015-12-30 22:24:38', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.3ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 22:24:38.732866"], ["updated_at", "2015-12-30 22:24:38.736553"], ["id", 980190962]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-30 23:24:38 +0100 Processing by Main::PagesController#index as HTML Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1 Rendered main/pages/index.html.erb within layouts/application (3.6ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 566ms (Views: 554.0ms | ActiveRecord: 0.2ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 22:24:39.410611"], ["updated_at", "2015-12-30 22:24:39.410611"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:24:36.392089') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:24:36.392089') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 22:24:39.435180"], ["updated_at", "2015-12-30 22:24:39.435180"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:24:36.421662') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:24:36.421662') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:24:36.430538') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:24:36.430538') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 22:24:39.453882"], ["updated_at", "2015-12-30 22:24:39.453882"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:24:36.448970') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:24:36.448970') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:24:39.463894"], ["updated_at", "2015-12-30 22:24:39.463894"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:24:36.461464') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:24:39.470192"], ["updated_at", "2015-12-30 22:24:39.470192"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:24:36.468046') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:24:36.468046') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.6ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$7ZWunnvrTuY1wBIQF.z7OuJiHF3Gap5zmkPqpuoJXMdRy9hbmPH/i', '2015-12-30 22:28:10', '2015-12-30 22:28:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$p.1WRzmBHPYlji63AYeLUeotve2glRAgFi2HPNbPUzWyfjWtX3KAO', '2015-12-30 22:28:10', '2015-12-30 22:28:10', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 22:28:10', '2015-12-30 22:28:10', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.4ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 22:28:10.611480"], ["updated_at", "2015-12-30 22:28:10.615806"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-30 23:28:10 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (4.7ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 504ms (Views: 492.3ms | ActiveRecord: 0.0ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.4ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:28:11.248607"], ["updated_at", "2015-12-30 22:28:11.248607"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:28:08.217790') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:28:08.217790') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 22:28:11.260781"], ["updated_at", "2015-12-30 22:28:11.260781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:28:08.258148') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:28:08.258148') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:28:08.259002') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:28:08.259002') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:28:11.269934"], ["updated_at", "2015-12-30 22:28:11.269934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:28:08.267791') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 22:28:11.275450"], ["updated_at", "2015-12-30 22:28:11.275450"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:28:08.273802') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:28:08.273802') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 22:28:11.283648"], ["updated_at", "2015-12-30 22:28:11.283648"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:28:08.280939') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:28:08.280939') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.4ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$mK5DhMX8vGoDsN6x9FwSgOXwuuTpKavf1HNprhYjUK4Nw1hL1WWF.', '2015-12-30 22:57:09', '2015-12-30 22:57:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$lATkQDPjMML7JtIY6HXNwufhKBEskscLTXu.5RHJyu2FAh4lWN8yK', '2015-12-30 22:57:09', '2015-12-30 22:57:09', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 22:57:09', '2015-12-30 22:57:09', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.3ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 22:57:09.285472"], ["updated_at", "2015-12-30 22:57:09.289210"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-30 23:57:09 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.1ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 581ms (Views: 567.1ms | ActiveRecord: 0.0ms) Started GET "/user/sessions/new" for 127.0.0.1 at 2015-12-30 23:57:09 +0100 Processing by User::SessionsController#new as HTML Rendered shared/_sign_in_form.html.erb (2.3ms) Rendered user/sessions/new.html.erb within layouts/application (7.7ms) Rendered layouts/_flash.html.erb (0.4ms) Completed 200 OK in 23ms (Views: 22.3ms | ActiveRecord: 0.0ms)  (0.6ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (1.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 22:57:10.180996"], ["updated_at", "2015-12-30 22:57:10.180996"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.6ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:57:07.148487') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:57:07.148487') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 22:57:10.251096"], ["updated_at", "2015-12-30 22:57:10.251096"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:57:07.193043') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.6ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:57:07.193043') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 22:57:10.301625"], ["updated_at", "2015-12-30 22:57:10.301625"]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.6ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:57:07.278480') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.6ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:57:07.278480') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (1.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:57:07.294000') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:57:07.294000') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.4ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:57:10.422012"], ["updated_at", "2015-12-30 22:57:10.422012"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (11.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:57:07.395944') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.8ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:57:07.395944') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:57:10.478398"], ["updated_at", "2015-12-30 22:57:10.478398"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:57:07.453545') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (1.8ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$jWzd22kKn8fN8EIByLPnAeu2Z/lteILmE7rLcWEeg22/Oltmay4/K', '2015-12-30 22:59:29', '2015-12-30 22:59:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$NCxTSW9dT8AtNGkw0HjpcuKC.fM2ix9EktnI7jzKxohTvRcl.6HLm', '2015-12-30 22:59:29', '2015-12-30 22:59:29', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 22:59:29', '2015-12-30 22:59:29', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 22:59:29.453087"], ["updated_at", "2015-12-30 22:59:29.453087"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:59:26.410194') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:59:26.410194') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:59:26.424559') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:59:26.424559') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 22:59:29.467617"], ["updated_at", "2015-12-30 22:59:29.467617"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:59:26.463955') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:59:26.463955') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 22:59:29.474553"], ["updated_at", "2015-12-30 22:59:29.474553"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:59:26.472867') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:59:26.472867') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:59:29.484343"], ["updated_at", "2015-12-30 22:59:29.484343"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:59:26.481723') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 22:59:29.491184"], ["updated_at", "2015-12-30 22:59:29.491184"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:59:26.488703') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 22:59:26.488703') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 22:59:29.500241"], ["updated_at", "2015-12-30 22:59:29.501361"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-30 23:59:29 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.5ms) Rendered layouts/_flash.html.erb (2.7ms) Completed 200 OK in 560ms (Views: 547.6ms | ActiveRecord: 0.0ms) Started GET "/user/sessions/new" for 127.0.0.1 at 2015-12-30 23:59:30 +0100 Processing by User::SessionsController#new as HTML Rendered shared/_sign_in_form.html.erb (2.8ms) Rendered user/sessions/new.html.erb within layouts/application (8.1ms) Rendered layouts/_flash.html.erb (0.2ms) Completed 200 OK in 23ms (Views: 22.0ms | ActiveRecord: 0.0ms)  (0.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (1.3ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$0M08Mi.2CQb0PqDnJ0g6k.XPhZzmy/AvPLs49KY0b8t4wFm05dwUG', '2015-12-30 23:05:02', '2015-12-30 23:05:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$FUcT8UsCTTzJR6g6Kfsc7OEGyn0/HO2CynF1D/eyQzFocUODjXv7O', '2015-12-30 23:05:02', '2015-12-30 23:05:02', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:05:02', '2015-12-30 23:05:02', 980190962)  (0.7ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:05:02.566190"], ["updated_at", "2015-12-30 23:05:02.566190"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:04:59.530828') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:04:59.530828') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:05:02.578028"], ["updated_at", "2015-12-30 23:05:02.578028"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:04:59.575582') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:05:02.586378"], ["updated_at", "2015-12-30 23:05:02.586378"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:04:59.583127') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:04:59.583127') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:04:59.584173') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:04:59.584173') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:05:02.598001"], ["updated_at", "2015-12-30 23:05:02.598001"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:04:59.594583') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:04:59.594583') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:05:02.605742"], ["updated_at", "2015-12-30 23:05:02.605742"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:04:59.603768') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:04:59.603768') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:05:02.618344"], ["updated_at", "2015-12-30 23:05:02.619335"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:05:02 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.8ms) Rendered layouts/_flash.html.erb (1.4ms) Completed 200 OK in 579ms (Views: 566.5ms | ActiveRecord: 0.0ms)  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.8ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.4ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$lJkua11xUFI45MjjaszS7O1yiHUmPnXW7GVFw0/YJBOViMIt/eaJe', '2015-12-30 23:05:46', '2015-12-30 23:05:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$WXKnO0di2cleJQLbOP5Td.rJISTamLsuAwtGn3c2TCia204O0DkTu', '2015-12-30 23:05:46', '2015-12-30 23:05:46', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:05:46', '2015-12-30 23:05:46', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.4ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:05:46.389859"], ["updated_at", "2015-12-30 23:05:46.394035"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:05:46 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.7ms) Rendered layouts/_flash.html.erb (1.3ms) Completed 200 OK in 563ms (Views: 550.5ms | ActiveRecord: 0.0ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:05:47.226145"], ["updated_at", "2015-12-30 23:05:47.226145"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:05:44.199141') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:05:44.199141') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:05:47.266339"], ["updated_at", "2015-12-30 23:05:47.266339"]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:05:44.237221') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.5ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:05:44.237221') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.8ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:05:47.303360"], ["updated_at", "2015-12-30 23:05:47.303360"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:05:44.296632') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (1.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:05:44.296632') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.5ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:05:47.324896"], ["updated_at", "2015-12-30 23:05:47.324896"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:05:44.316531') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.4ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.5ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.5ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:05:47.347367"], ["updated_at", "2015-12-30 23:05:47.347367"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.9ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:05:44.335282') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:05:44.335282') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:05:44.339402') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:05:44.339402') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (2.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$9bXPeAh/rRAM85WkUK8TMeaaA9CxUkL..T9AJOKN5e1MnE4G2iBzG', '2015-12-30 23:08:57', '2015-12-30 23:08:57', 980190962) Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$kNR1aW5rA1hPAdMiOEUZ0u4zNKBXHx.TJqzJfFSA/dyL2otXP1lPi', '2015-12-30 23:08:57', '2015-12-30 23:08:57', 298486374) Fixture Delete (0.5ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:08:57', '2015-12-30 23:08:57', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:08:57.565847"], ["updated_at", "2015-12-30 23:08:57.565847"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:08:54.533738') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:08:54.533738') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:08:57.583419"], ["updated_at", "2015-12-30 23:08:57.583419"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:08:54.575294') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:08:57.591372"], ["updated_at", "2015-12-30 23:08:57.591372"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:08:54.588761') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:08:54.588761') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:08:57.601751"], ["updated_at", "2015-12-30 23:08:57.601751"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:08:54.597449') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:08:54.597449') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:08:54.598982') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:08:54.598982') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:08:57.613836"], ["updated_at", "2015-12-30 23:08:57.613836"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:08:54.610165') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:08:54.610165') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (2.5ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.3ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:08:57.628918"], ["updated_at", "2015-12-30 23:08:57.629969"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:08:57 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.9ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 1612ms (Views: 1599.6ms | ActiveRecord: 0.0ms)  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$ijvBpd6BYV3.UU8VpMOpsu58MO2QEBNrr2pJG8migXZbKMs4kMncC', '2015-12-30 23:13:08', '2015-12-30 23:13:08', 980190962) Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$2Cc2ElD0.6usts3FRtIJ8O.IBYKrrxywq8747WFKnut.C1q6q438.', '2015-12-30 23:13:08', '2015-12-30 23:13:08', 298486374) Fixture Delete (0.6ms) DELETE FROM "articles" Fixture Insert (0.3ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:13:08', '2015-12-30 23:13:08', 980190962)  (1.2ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.3ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:13:08.116454"], ["updated_at", "2015-12-30 23:13:08.120806"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:13:08 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.9ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 568ms (Views: 556.0ms | ActiveRecord: 0.0ms)  (0.6ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:13:08.828867"], ["updated_at", "2015-12-30 23:13:08.828867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:13:05.797628') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:13:05.797628') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:13:08.846220"], ["updated_at", "2015-12-30 23:13:08.846220"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:13:05.840750') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:13:05.840750') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:13:05.842421') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:13:05.842421') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.7ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:13:08.864580"], ["updated_at", "2015-12-30 23:13:08.864580"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:13:05.860022') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:13:05.860022') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:13:08.879718"], ["updated_at", "2015-12-30 23:13:08.879718"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:13:05.875640') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:13:08.888152"], ["updated_at", "2015-12-30 23:13:08.888152"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:13:05.886237') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:13:05.886237') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.4ms) DELETE FROM "admins" Fixture Insert (0.8ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$4BlUX/KsyjsbPqEfwauTqel.tZPfdIS.rGsmRdCbF8eiIDMaTdacq', '2015-12-30 23:14:15', '2015-12-30 23:14:15', 980190962) Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$5mcBiQjPQrJM3mBkzB0TmeNttHiHaBRwgFpkLFot9b.jpSOYxErsu', '2015-12-30 23:14:15', '2015-12-30 23:14:15', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:14:15', '2015-12-30 23:14:15', 980190962)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:14:15.993188"], ["updated_at", "2015-12-30 23:14:15.993188"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:14:12.960955') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:14:12.960955') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:14:12.972092') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:14:12.972092') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:14:16.007956"], ["updated_at", "2015-12-30 23:14:16.007956"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:14:13.006140') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:14:13.006140') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:14:16.015899"], ["updated_at", "2015-12-30 23:14:16.015899"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:14:13.013532') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:14:16.022822"], ["updated_at", "2015-12-30 23:14:16.022822"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:14:13.020138') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:14:13.020138') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:14:16.033191"], ["updated_at", "2015-12-30 23:14:16.033191"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:14:13.030076') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:14:13.030076') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:14:16.042545"], ["updated_at", "2015-12-30 23:14:16.043415"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.6ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$T0BwaaLeWdA0QUe3aRUGke9bbmTtzyizF5QxXYgb2.vlr5UjyeaTS', '2015-12-30 23:24:23', '2015-12-30 23:24:23', 980190962) Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$HDO6PHfoplLcJRF3Ns7jUuabZKfsFoFKK.pLkuLhgsWsvEOUdQyL2', '2015-12-30 23:24:23', '2015-12-30 23:24:23', 298486374) Fixture Delete (0.6ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:24:23', '2015-12-30 23:24:23', 980190962)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:24:23.620935"], ["updated_at", "2015-12-30 23:24:23.620935"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:24:20.587189') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:24:20.587189') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:24:20.598626') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:24:20.598626') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:24:23.635188"], ["updated_at", "2015-12-30 23:24:23.635188"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:24:20.632282') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:24:23.641541"], ["updated_at", "2015-12-30 23:24:23.641541"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:24:20.639855') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:24:20.639855') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:24:23.649646"], ["updated_at", "2015-12-30 23:24:23.649646"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:24:20.647272') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:24:20.647272') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:24:23.658193"], ["updated_at", "2015-12-30 23:24:23.658193"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:24:20.655378') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:24:20.655378') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:24:23.666539"], ["updated_at", "2015-12-30 23:24:23.667488"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (6.0ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$XOF39eSQ2aKzU6cpfcB5uOKReIfipWVxWz3.DCx8Hdr.opuZzQ3eG', '2015-12-30 23:29:21', '2015-12-30 23:29:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$QUHc6zP7j6B/aD2Sq6ZlXullJKpLlAaPWvv6xw4pe26hWzbpbfySO', '2015-12-30 23:29:21', '2015-12-30 23:29:21', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:29:21', '2015-12-30 23:29:21', 980190962)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.3ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:29:21.384826"], ["updated_at", "2015-12-30 23:29:21.388947"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:29:21.418756"], ["updated_at", "2015-12-30 23:29:21.418756"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:29:18.400866') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:29:18.400866') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:29:21.430657"], ["updated_at", "2015-12-30 23:29:21.430657"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:29:18.428076') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:29:21.439052"], ["updated_at", "2015-12-30 23:29:21.439052"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.5ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:29:18.436229') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:29:18.436229') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:29:21.447854"], ["updated_at", "2015-12-30 23:29:21.447854"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:29:18.446046') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:29:18.446046') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:29:21.457040"], ["updated_at", "2015-12-30 23:29:21.457040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:29:18.453359') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:29:18.453359') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:29:18.454207') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:29:18.454207') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.5ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "admins" Fixture Insert (0.6ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$WOhH9AVNy29h9K2RRjZGn.iZ1WMDIHW/XVgfEr.KaLP6JbgD/lOq2', '2015-12-30 23:30:21', '2015-12-30 23:30:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$SDfsiW9PFt754zu4QlEBZeGdBKlGmsyZXrYKdcRDVdotwPDAkC/Bu', '2015-12-30 23:30:21', '2015-12-30 23:30:21', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:30:21', '2015-12-30 23:30:21', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:30:21.667989"], ["updated_at", "2015-12-30 23:30:21.667989"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:30:18.625718') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:30:21.678500"], ["updated_at", "2015-12-30 23:30:21.678500"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:30:18.675494') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:30:18.675494') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:30:18.676432') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:30:18.676432') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:30:21.689962"], ["updated_at", "2015-12-30 23:30:21.689962"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:30:18.687173') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:30:18.687173') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:30:21.697158"], ["updated_at", "2015-12-30 23:30:21.697158"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:30:18.695107') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:30:18.695107') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:30:21.705316"], ["updated_at", "2015-12-30 23:30:21.705316"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:30:18.702783') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:30:18.702783') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.3ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:30:21.714003"], ["updated_at", "2015-12-30 23:30:21.714873"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:30:25 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.2ms) Rendered layouts/_flash.html.erb (1.5ms) Completed 200 OK in 542ms (Views: 529.3ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:30:25 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:30:25 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:30:26 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:30:26 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:30:26 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"} Article Load (0.4ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.0ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:30:26 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:30:26.241185') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms) Started GET "/articles?page=2" for 127.0.0.1 at 2015-12-31 00:30:26 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"2"} Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$1BzTNCTv7UKeEMp5njxdt..1WGQ6fRmdmdtb7pCxdgyCJdh6Iu8Qa', '2015-12-30 23:30:26', '2015-12-30 23:30:26', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$zvBJKDM7D.Y556rld2ul4et8VGlRLl6Iw4QobqUngVB9eYoTZUghK', '2015-12-30 23:30:26', '2015-12-30 23:30:26', 298486374) Fixture Delete (0.2ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:30:26', '2015-12-30 23:30:26', 980190962)  (0.9ms) commit transaction  (0.6ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$1qLXOmP/TH0DDuLu8pUz8.s1cp..yUZixKsg9VfgLBHLm2Dykcvf6', '2015-12-30 23:32:03', '2015-12-30 23:32:03', 980190962) Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$VDMDpoE.oQxOH.elKH17mO4ICsnE1uEupuEj9uuZCoI3QSjGYZXp2', '2015-12-30 23:32:03', '2015-12-30 23:32:03', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:32:03', '2015-12-30 23:32:03', 980190962)  (1.5ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:32:03.108476"], ["updated_at", "2015-12-30 23:32:03.112611"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:32:06 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.7ms) Rendered layouts/_flash.html.erb (1.4ms) Completed 200 OK in 550ms (Views: 537.9ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:32:06 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:32:06 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:32:06 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:32:06 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:32:06 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"} Article Load (0.4ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.0ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:32:06 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:32:06.851518') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 6ms (Views: 0.6ms | ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$7FYci10X25.4lU7/fYqN8uhrIGPwyHm9fvfxfo86ykby5mnJfxbFC', '2015-12-30 23:32:06', '2015-12-30 23:32:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$yjeH5h92V5./a08Kc9W3PuXVRE4Wkr8baHz6Hh40l5rquMJ6BPS.m', '2015-12-30 23:32:06', '2015-12-30 23:32:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:32:06', '2015-12-30 23:32:06', 980190962)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:32:06.889812"], ["updated_at", "2015-12-30 23:32:06.889812"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:32:03.877690') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:32:03.877690') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:32:06.906233"], ["updated_at", "2015-12-30 23:32:06.906233"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:32:03.896811') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.6ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:32:03.896811') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:32:03.903111') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:32:03.903111') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:32:06.919438"], ["updated_at", "2015-12-30 23:32:06.919438"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:32:03.916461') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.8ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:32:06.930659"], ["updated_at", "2015-12-30 23:32:06.930659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:32:03.926708') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:32:03.926708') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:32:06.941987"], ["updated_at", "2015-12-30 23:32:06.941987"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:32:03.939055') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:32:03.939055') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$kg4m0mgOREoe0BIf2BucB.5FeLCOspe1Hfh.ZN5iXfqEoT1ssB2r2', '2015-12-30 23:33:35', '2015-12-30 23:33:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$5QJFceppmRdJJEKyus3x3uCQW.7iVE9MT6i5mvT4jn.KQJ2eer.A6', '2015-12-30 23:33:35', '2015-12-30 23:33:35', 298486374) Fixture Delete (0.2ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:33:35', '2015-12-30 23:33:35', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:33:35.376899"], ["updated_at", "2015-12-30 23:33:35.382167"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:33:38 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.2ms) Rendered layouts/_flash.html.erb (1.4ms) Completed 200 OK in 560ms (Views: 546.8ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:33:38 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:33:38 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:33:38 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:33:38 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:33:38 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 Rendered main/articles/index.json.jbuilder (6.3ms) Completed 200 OK in 44ms (Views: 40.3ms | ActiveRecord: 0.7ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:33:39 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:39.064024') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 0.5ms)  (2.4ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$y6eptTfCgyzuiznR1hck3erVAYT8AFpwHRKhqb7c5SePpxQ1S8F0a', '2015-12-30 23:33:44', '2015-12-30 23:33:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$AgqKOrTuti3oUHU.8SgbCeevEPat20g8ysXgSkqt.NXFBsxRAyTWa', '2015-12-30 23:33:44', '2015-12-30 23:33:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:33:44', '2015-12-30 23:33:44', 980190962)  (0.7ms) commit transaction  (0.0ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:33:44.117150"], ["updated_at", "2015-12-30 23:33:44.117150"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:41.101865') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:41.101865') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.9ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.5ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:33:44.139028"], ["updated_at", "2015-12-30 23:33:44.139028"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:41.127698') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:33:44.147584"], ["updated_at", "2015-12-30 23:33:44.147584"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:41.144286') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:41.144286') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:33:44.158097"], ["updated_at", "2015-12-30 23:33:44.158097"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:41.154367') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:41.154367') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:41.155504') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:41.155504') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:33:44.171232"], ["updated_at", "2015-12-30 23:33:44.171232"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:41.168083') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:41.168083') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.9ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "admins" Fixture Insert (0.3ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$3NlF6laNPfqXwHtmqFfrsuiCPkQuWWGsYX3h8dAeNxs6loXf.OoZy', '2015-12-30 23:34:00', '2015-12-30 23:34:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$UtD15NJq4rvvxWVM1o.UbuapVw8.KNSYkg/LBjZPVZTbS1i.xLACy', '2015-12-30 23:34:00', '2015-12-30 23:34:00', 298486374) Fixture Delete (0.2ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:34:00', '2015-12-30 23:34:00', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:34:00.557199"], ["updated_at", "2015-12-30 23:34:00.557199"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:57.514635') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:57.514635') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:34:00.569334"], ["updated_at", "2015-12-30 23:34:00.569334"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:57.566787') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:34:00.576987"], ["updated_at", "2015-12-30 23:34:00.576987"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:57.573837') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:57.573837') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:57.574837') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:57.574837') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:34:00.587978"], ["updated_at", "2015-12-30 23:34:00.587978"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:57.584853') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:57.584853') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:34:00.595438"], ["updated_at", "2015-12-30 23:34:00.595438"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:57.593310') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:33:57.593310') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:34:00.605338"], ["updated_at", "2015-12-30 23:34:00.606169"], ["id", 980190962]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:34:03 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.9ms) Rendered layouts/_flash.html.erb (1.1ms) Completed 200 OK in 612ms (Views: 599.3ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:34:03 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:34:03 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:34:03 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:34:03 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:34:03 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 Rendered main/articles/index.json.jbuilder (11.9ms) Completed 200 OK in 47ms (Views: 43.5ms | ActiveRecord: 0.7ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:34:03 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:34:03.914724') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms)  (1.8ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (5.6ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$DGl3F2yDRtTZRKtsIVBqReqktWxKOiEZD6NK9LMxhpbwG.2G6uami', '2015-12-30 23:35:31', '2015-12-30 23:35:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$MfWEAuv3LE8IlocyXyqv..c77IyINLw6YLNARZ52X4rsK70TyGpOO', '2015-12-30 23:35:31', '2015-12-30 23:35:31', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:35:31', '2015-12-30 23:35:31', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:35:31.131678"], ["updated_at", "2015-12-30 23:35:31.135078"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:35:33 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.5ms) Rendered layouts/_flash.html.erb (1.4ms) Completed 200 OK in 525ms (Views: 514.5ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:35:34 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:35:34 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:35:34 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:35:34 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:35:34 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 Rendered main/articles/index.json.jbuilder (5.1ms) Completed 200 OK in 37ms (Views: 34.5ms | ActiveRecord: 0.7ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:35:34 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:35:34.672180') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.4ms) Started GET "/articles?page=2" for 127.0.0.1 at 2015-12-31 00:35:34 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"2"}  (0.2ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 3 CACHE (0.0ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Rendered main/articles/index.json.jbuilder (1.5ms) Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.4ms)  (3.2ms) rollback transaction  (0.2ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$1JtJlEdWtRH.gORYuWzcmu2aRVABTGIUCxUm0xH57dsBINHR72JYW', '2015-12-30 23:35:39', '2015-12-30 23:35:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$zqi.l1vp2TYqg.if1iMmv.TID4XNy0n94St/O3p/eOG7wQJQyeCDS', '2015-12-30 23:35:39', '2015-12-30 23:35:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:35:39', '2015-12-30 23:35:39', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:35:39.906952"], ["updated_at", "2015-12-30 23:35:39.906952"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:35:36.889730') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:35:36.889730') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:35:39.917856"], ["updated_at", "2015-12-30 23:35:39.917856"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:35:36.914484') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:35:39.927149"], ["updated_at", "2015-12-30 23:35:39.927149"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:35:36.924176') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:35:36.924176') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:35:39.938650"], ["updated_at", "2015-12-30 23:35:39.938650"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:35:36.934719') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:35:36.934719') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:35:36.936035') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:35:36.936035') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:35:39.950647"], ["updated_at", "2015-12-30 23:35:39.950647"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:35:36.947450') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:35:36.947450') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$eKm8Xn2hThQDCMhSkWa73.Fq31G7TgSSjcqRsdHNTiZkLqAwV32Qy', '2015-12-30 23:36:13', '2015-12-30 23:36:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$PMsAZMkyAX2LAuEFioa66.Es7FNK2L0crI40svWEJhEGp6jRwa3/S', '2015-12-30 23:36:13', '2015-12-30 23:36:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:36:13', '2015-12-30 23:36:13', 980190962)  (0.9ms) commit transaction  (0.2ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:36:13.076392"], ["updated_at", "2015-12-30 23:36:13.080530"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:36:15 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.2ms) Rendered layouts/_flash.html.erb (1.4ms) Completed 200 OK in 516ms (Views: 506.0ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:36:16 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:36:16 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:36:16 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:36:16 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:36:16 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 Rendered main/articles/index.json.jbuilder (5.2ms) Completed 200 OK in 37ms (Views: 33.7ms | ActiveRecord: 0.6ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:36:16 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:16.207290') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "articles" Started GET "/articles?page=2" for 127.0.0.1 at 2015-12-31 00:36:16 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"2"}  (0.2ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 3 CACHE (0.0ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Rendered main/articles/index.json.jbuilder (1.4ms) Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.4ms)  (2.6ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "admins" Fixture Insert (0.3ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$mSUizx4RLXUraP.i1X9yqu8T8Fee78aadI.lTHGlAP706MQttxOr.', '2015-12-30 23:36:21', '2015-12-30 23:36:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$2fIEyXAgiU.jS.nFJ5qKI.7q9FgbBkGyB7RS6Ctmi83zY65yHeXuS', '2015-12-30 23:36:21', '2015-12-30 23:36:21', 298486374) Fixture Delete (0.2ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:36:21', '2015-12-30 23:36:21', 980190962)  (0.9ms) commit transaction  (0.2ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:36:21.400064"], ["updated_at", "2015-12-30 23:36:21.400064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:18.378844') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:36:21.411595"], ["updated_at", "2015-12-30 23:36:21.411595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:18.407420') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:18.407420') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:18.408701') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:18.408701') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:36:21.424954"], ["updated_at", "2015-12-30 23:36:21.424954"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:18.421449') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:18.421449') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:36:21.433501"], ["updated_at", "2015-12-30 23:36:21.433501"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:18.431689') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:18.431689') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:36:21.442275"], ["updated_at", "2015-12-30 23:36:21.442275"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:18.439026') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:18.439026') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.4ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$x2xuer01xKEKJip6yyFzYOfI94OJUucjdONvRYcQtoEzxKae7JQTG', '2015-12-30 23:36:32', '2015-12-30 23:36:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$uRrjxrHEqei9/AcH6hC9t.eV9rPnRsIijn8.r/2bsf9nqmTbH2EhK', '2015-12-30 23:36:32', '2015-12-30 23:36:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:36:32', '2015-12-30 23:36:32', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:36:32.346289"], ["updated_at", "2015-12-30 23:36:32.346289"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:29.309311') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:29.309311') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:36:32.363324"], ["updated_at", "2015-12-30 23:36:32.363324"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:29.356474') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:29.356474') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:36:32.370468"], ["updated_at", "2015-12-30 23:36:32.370468"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:29.367966') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:29.367966') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:29.368814') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:29.368814') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:36:32.380403"], ["updated_at", "2015-12-30 23:36:32.380403"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:29.378122') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:36:32.386329"], ["updated_at", "2015-12-30 23:36:32.386329"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:29.384114') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:29.384114') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:36:32.394990"], ["updated_at", "2015-12-30 23:36:32.395674"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:36:34 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.6ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 603ms (Views: 589.0ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:36:35 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:36:35 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:36:35 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:36:35 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:36:35 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 Rendered main/articles/index.json.jbuilder (16.7ms) Completed 200 OK in 69ms (Views: 64.2ms | ActiveRecord: 0.8ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:36:35 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (3.5ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:35.676416') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 3.5ms) Article Load (0.6ms) SELECT "articles".* FROM "articles" Started GET "/articles?page=2" for 127.0.0.1 at 2015-12-31 00:36:35 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"2"}  (0.2ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 3 CACHE (0.0ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Rendered main/articles/index.json.jbuilder (1.5ms) Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.4ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$aRuH7eS0BVMd09ofe9O3xeAyIFyy.JdIcMAy7zME8wt8WI9DQPMvu', '2015-12-30 23:36:40', '2015-12-30 23:36:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$sSaqS04Z6ohRaBN/e8Dcf.IwPRRiXNNi0MQ73RS9xUfWk.yAkOjTq', '2015-12-30 23:36:40', '2015-12-30 23:36:40', 298486374) Fixture Delete (0.2ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:36:40', '2015-12-30 23:36:40', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.3ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$GnzH1PK5NEuc2L1SaRHqD.Wrx9bAM3BjRxw2QAX3hLq3dgF1wBM.G', '2015-12-30 23:36:47', '2015-12-30 23:36:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$ORVGw/xol1yDasCiqMdapuzo.XaRzXXDVlLB6BUesQNkSrapFXa2C', '2015-12-30 23:36:47', '2015-12-30 23:36:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:36:47', '2015-12-30 23:36:47', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:36:47.963195"], ["updated_at", "2015-12-30 23:36:47.963195"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:44.927685') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:44.927685') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:36:47.974844"], ["updated_at", "2015-12-30 23:36:47.974844"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:44.972308') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:44.972308') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:44.973187') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:44.973187') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:36:47.983348"], ["updated_at", "2015-12-30 23:36:47.983348"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:44.981246') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:36:47.988625"], ["updated_at", "2015-12-30 23:36:47.988625"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:44.987139') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:44.987139') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:36:47.995908"], ["updated_at", "2015-12-30 23:36:47.995908"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:44.993466') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:44.993466') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:36:48.004224"], ["updated_at", "2015-12-30 23:36:48.004895"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:36:50 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.4ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 555ms (Views: 543.9ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:36:50 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:36:50 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:36:50 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:36:50 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:36:50 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 Rendered main/articles/index.json.jbuilder (11.5ms) Completed 200 OK in 43ms (Views: 40.3ms | ActiveRecord: 0.6ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:36:50 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:36:50.925383') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) Article Load (0.3ms) SELECT "articles".* FROM "articles" Started GET "/articles?page=2" for 127.0.0.1 at 2015-12-31 00:36:50 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"2"}  (0.2ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 3 CACHE (0.0ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Rendered main/articles/index.json.jbuilder (1.5ms) Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.3ms)  (2.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$PBtg1Qc1TV1j/f19hBe3/OTfoplVnkMaa51QtfTBgQd/vM2fm5U9K', '2015-12-30 23:37:27', '2015-12-30 23:37:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$B16dFmzvr.niRQ11mP9ToOuZf79fKAEySzYxRkR0AlMKlO.F1bylq', '2015-12-30 23:37:27', '2015-12-30 23:37:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:37:27', '2015-12-30 23:37:27', 980190962)  (4.2ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.4ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:37:27.574836"], ["updated_at", "2015-12-30 23:37:27.574836"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:24.537345') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:24.537345') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.5ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:24.557702') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:24.557702') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:37:27.586961"], ["updated_at", "2015-12-30 23:37:27.586961"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:24.585467') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:24.585467') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:37:27.594140"], ["updated_at", "2015-12-30 23:37:27.594140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:24.592055') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:37:27.600970"], ["updated_at", "2015-12-30 23:37:27.600970"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:24.598053') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:24.598053') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:37:27.608168"], ["updated_at", "2015-12-30 23:37:27.608168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:24.605834') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:24.605834') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:37:27.616729"], ["updated_at", "2015-12-30 23:37:27.617384"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:37:29 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.0ms) Rendered layouts/_flash.html.erb (1.1ms) Completed 200 OK in 557ms (Views: 546.9ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:37:30 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:37:30 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:37:30 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:37:30 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:37:30 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 Rendered main/articles/index.json.jbuilder (15.2ms) Completed 200 OK in 49ms (Views: 45.6ms | ActiveRecord: 0.7ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:37:30 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:30.497277') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms) Article Load (0.2ms) SELECT "articles".* FROM "articles" Started GET "/articles?page=2" for 127.0.0.1 at 2015-12-31 00:37:30 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"2"}  (0.2ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 3 CACHE (0.0ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Rendered main/articles/index.json.jbuilder (1.6ms) Completed 200 OK in 4ms (Views: 2.1ms | ActiveRecord: 0.4ms)  (2.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$3Les0vclPFXYb0DvlElUhObMwVRRS6kq2/Qf7tnWEbfl/q/EDWdbO', '2015-12-30 23:37:53', '2015-12-30 23:37:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$pEXO/Z1yORo8AWL20xEuaOgOiY1YZK3Xf9lg988JsQUNxLdgLH3tS', '2015-12-30 23:37:53', '2015-12-30 23:37:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:37:53', '2015-12-30 23:37:53', 980190962)  (2.6ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:37:53.435203"], ["updated_at", "2015-12-30 23:37:53.435203"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:50.394251') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:50.394251') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:50.417290') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:50.417290') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:37:53.449526"], ["updated_at", "2015-12-30 23:37:53.449526"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:50.446500') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:50.446500') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:37:53.456629"], ["updated_at", "2015-12-30 23:37:53.456629"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:50.454512') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:37:53.464819"], ["updated_at", "2015-12-30 23:37:53.464819"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:50.461135') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:50.461135') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:37:53.471370"], ["updated_at", "2015-12-30 23:37:53.471370"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:50.469962') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:50.469962') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:37:53.478139"], ["updated_at", "2015-12-30 23:37:53.478844"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:37:55 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.0ms) Rendered layouts/_flash.html.erb (1.3ms) Completed 200 OK in 474ms (Views: 463.6ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:37:56 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:37:56 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:37:56 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:37:56 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:37:56 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.5ms) SELECT COUNT(*) FROM "articles"  (0.1ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 Rendered main/articles/index.json.jbuilder (9.8ms) Completed 200 OK in 42ms (Views: 38.2ms | ActiveRecord: 0.9ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:37:56 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:37:56.290369') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms) Article Load (0.2ms) SELECT "articles".* FROM "articles" Started GET "/articles?page=2" for 127.0.0.1 at 2015-12-31 00:37:56 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"2"}  (0.2ms) SELECT COUNT(*) FROM "articles"  (0.3ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 3 CACHE (0.0ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Rendered main/articles/index.json.jbuilder (1.4ms) Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.6ms)  (2.8ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "admins" Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$F5e.rVEj2jZhuqA6dbDCA.ovF7tDoE2zEgQs28PJFR2n5g0zz29Zq', '2015-12-30 23:38:01', '2015-12-30 23:38:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$bbCwcnYdS/K470bfcpo/zeyvgxk.me1mSqUPvRUneYOHgREhm9.Lm', '2015-12-30 23:38:01', '2015-12-30 23:38:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:38:01', '2015-12-30 23:38:01', 980190962)  (1.2ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.3ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "admins" Fixture Insert (0.4ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$uk7o.gajOVBDfM21FDcqM.HMA2M8ZrlHsO4cGm10hzzHicUXqIPJC', '2015-12-30 23:45:36', '2015-12-30 23:45:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$B/zI7CDlPAkLS55CKiYeEePGrzdOTnZ/00FXvwjTJwp8l3WKg60uW', '2015-12-30 23:45:36', '2015-12-30 23:45:36', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:45:36', '2015-12-30 23:45:36', 980190962, 668453117) Fixture Delete (0.4ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$sSIo78rEV2Qn7zOZKrcMjue/902KzU9H0mf.Fl6zcV.2fI7OUAaFO', '2015-12-23 23:45:36.000000', '2015-12-30 23:45:36', '2015-12-30 23:45:36', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:45:36.508272"], ["updated_at", "2015-12-30 23:45:36.508272"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:45:33.474367') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:45:33.474367') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:45:33.486996') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:45:33.486996') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:45:36.521653"], ["updated_at", "2015-12-30 23:45:36.521653"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:45:33.519458') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:45:33.519458') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:45:36.530058"], ["updated_at", "2015-12-30 23:45:36.530058"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:45:33.527468') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:45:33.527468') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:45:36.538316"], ["updated_at", "2015-12-30 23:45:36.538316"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:45:33.535852') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.3ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:45:36.545859"], ["updated_at", "2015-12-30 23:45:36.545859"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:45:33.542802') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:45:33.542802') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.6ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:45:36.555671"], ["updated_at", "2015-12-30 23:45:36.556618"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:45:40 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.6ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 679ms (Views: 666.0ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:45:40 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:45:40 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:45:40 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:45:40 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:45:41 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.5ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 Rendered main/articles/index.json.jbuilder (5.7ms) Completed 200 OK in 42ms (Views: 38.6ms | ActiveRecord: 0.8ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:45:41 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:45:41.112781') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$Jl6FykQK8.15hoeSZ2IF1eyIOqoGtlYU.jj0cyZC.992aASl24LRC', '2015-12-30 23:45:46', '2015-12-30 23:45:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$0fjQV0DkF1U1BS4vKORcv.a0mFmyycmidpSQK6s2HpZw.w/YivWMm', '2015-12-30 23:45:46', '2015-12-30 23:45:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:45:46', '2015-12-30 23:45:46', 980190962, 668453117) Fixture Delete (0.1ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$m1oiWnv1qgIUYBOgPwxUduXSiqBQenKRCDJAojXBWE/KXCNF4qwaG', '2015-12-23 23:45:46.000000', '2015-12-30 23:45:46', '2015-12-30 23:45:46', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$q8sIgiDyB0/.Gx36wP6wCuEjgfYYu8QE/Xw/rcAaTgVNo3d8tcT2q', '2015-12-30 23:46:37', '2015-12-30 23:46:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$mMnm3e3sCJR8J/BsvY2A7.odYZVOxkGo/MT2.7hAc8sBDQcWSKCxG', '2015-12-30 23:46:37', '2015-12-30 23:46:37', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 23:46:37', '2015-12-30 23:46:37', 980190962, 668453117) Fixture Delete (0.5ms) DELETE FROM "users" Fixture Insert (0.3ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$/28O158CbsIT.azCorb1HO1kHa/Jtm8YtfdVZb4/G5rh0TYWFNeu2', '2015-12-23 23:46:37.000000', '2015-12-30 23:46:37', '2015-12-30 23:46:37', 980190962)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:46:37.596019"], ["updated_at", "2015-12-30 23:46:37.596019"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:46:34.556532') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:46:37.606195"], ["updated_at", "2015-12-30 23:46:37.606195"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:46:34.604231') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:46:34.604231') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:46:37.616196"], ["updated_at", "2015-12-30 23:46:37.616196"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:46:34.612504') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:46:34.612504') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:46:34.613516') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:46:34.613516') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:46:37.627493"], ["updated_at", "2015-12-30 23:46:37.627493"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:46:34.624298') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:46:34.624298') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:46:37.636022"], ["updated_at", "2015-12-30 23:46:37.636022"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:46:34.633072') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:46:34.633072') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction  (0.3ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "articles" SET "published_at" = ?, "updated_at" = ? WHERE "articles"."id" = ? [["published_at", "2015-12-30 23:46:37.650122"], ["updated_at", "2015-12-30 23:46:37.651040"], ["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:46:40 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.0ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 639ms (Views: 626.6ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:46:41 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:46:41 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:46:41 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:46:41 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:46:41 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"} Article Load (0.6ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL)  (0.2ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 Rendered main/articles/index.json.jbuilder (6.9ms) Completed 200 OK in 53ms (Views: 48.2ms | ActiveRecord: 1.1ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:46:41 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:46:41.602719') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.3ms)  (2.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$JJ1f0kab0C5wUm7CyxOXiu4ZG0tgViByJoV0IF5M.UGaVWJNvtwQK', '2015-12-30 23:48:00', '2015-12-30 23:48:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$HfeGjDymmiAWpJL/VcFyWOumuvyQXHV2/LPdO8u4CcVic3tXTescC', '2015-12-30 23:48:00', '2015-12-30 23:48:00', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-29 23:48:00.000000', '2015-12-30 23:48:00', '2015-12-30 23:48:00', 980190962, 668453117) Fixture Delete (0.3ms) DELETE FROM "users" Fixture Insert (0.2ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$FDpr..0FUzdb4KMbC3mL5uIEwX4nZsv.0ly9Rzlk3KR5nRj/z.fsy', '2015-12-23 23:48:00.000000', '2015-12-30 23:48:00', '2015-12-30 23:48:00', 980190962)  (1.2ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.3ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1 Started GET "/" for 127.0.0.1 at 2015-12-31 00:48:03 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.0ms) Rendered layouts/_flash.html.erb (1.6ms) Completed 200 OK in 565ms (Views: 552.9ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:48:04 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:48:04 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:48:04 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:48:04 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:48:04 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.5ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (668453117) Rendered main/articles/_article_for_list.json.jbuilder (24.1ms) Rendered main/articles/index.json.jbuilder (51.8ms) Completed 500 Internal Server Error in 96ms (ActiveRecord: 1.2ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:48:04 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:48:04.501383') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 0.4ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$XP4pmKF1p3QwsudvRg/uIuCHR96ycG0CISEpKZdQUXA7oqBJJPU0G', '2015-12-30 23:48:04', '2015-12-30 23:48:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$0ya0TiXRt9CJgqt4Irc9DuHgvPkD6hVUO.q7ammIr//lqI.M6nnF.', '2015-12-30 23:48:04', '2015-12-30 23:48:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-29 23:48:04.000000', '2015-12-30 23:48:04', '2015-12-30 23:48:04', 980190962, 668453117) Fixture Delete (0.1ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$4q1QOkXS1Y89yxIM/G6nMOlwXOVmf91Iuo4n/rtTWC6PVs8ueyx96', '2015-12-23 23:48:04.000000', '2015-12-30 23:48:04', '2015-12-30 23:48:04', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.6ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:48:04.567321"], ["updated_at", "2015-12-30 23:48:04.567321"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:48:01.534933') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:48:01.534933') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:48:04.590803"], ["updated_at", "2015-12-30 23:48:04.590803"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:48:01.580196') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:48:01.580196') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:48:04.600747"], ["updated_at", "2015-12-30 23:48:04.600747"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:48:01.597739') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.3ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:48:04.609588"], ["updated_at", "2015-12-30 23:48:04.609588"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:48:01.606247') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:48:01.606247') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.5ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:48:04.621792"], ["updated_at", "2015-12-30 23:48:04.621792"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:48:01.617614') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:48:01.617614') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:48:01.618790') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:48:01.618790') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$QIQzzBiWtGSQpAs.gkDC2u7qmo5/AKDPgYrMssMA.TSE2e3Ya2R6u', '2015-12-30 23:49:39', '2015-12-30 23:49:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$fxL0nWiIM2eYeJHuHPjZRu40HueKzYiA8jq8TqusiZw6oAEsexmaW', '2015-12-30 23:49:39', '2015-12-30 23:49:39', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-29 23:49:39.000000', '2015-12-30 23:49:39', '2015-12-30 23:49:39', 980190962, 668453117) Fixture Delete (0.4ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$3XMQyj6j/BSP7CCl8bemm.ch6BvqjmmOtm8iHmgnJkSIXZRpsiVPC', '2015-12-23 23:49:39.000000', '2015-12-30 23:49:39', '2015-12-30 23:49:39', 980190962)  (0.7ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Started GET "/" for 127.0.0.1 at 2015-12-31 00:49:42 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.4ms) Rendered layouts/_flash.html.erb (1.3ms) Completed 200 OK in 624ms (Views: 610.6ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:49:43 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:49:43 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:49:43 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:49:43 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:49:43 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.5ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.4ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (668453117) Rendered main/articles/_article_for_list.json.jbuilder (25.3ms) Rendered main/articles/index.json.jbuilder (62.1ms) Completed 500 Internal Server Error in 108ms (ActiveRecord: 1.4ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:49:43 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:43.394588') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 7ms (Views: 0.7ms | ActiveRecord: 0.5ms) Article Load (0.2ms) SELECT "articles".* FROM "articles"  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$xHTahnAa1VIPkisjrFPbd.JI9F5Or0KP4IaUInqt137CYeHz30cty', '2015-12-30 23:49:43', '2015-12-30 23:49:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$fPcD7naoMQ4xEW/izPpYQe2tW0XL0K8u1SfZHhoHrCbWcCusyCgvW', '2015-12-30 23:49:43', '2015-12-30 23:49:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-29 23:49:43.000000', '2015-12-30 23:49:43', '2015-12-30 23:49:43', 980190962, 668453117) Fixture Delete (0.1ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$cnRXJ.fqQ7Fynjuo98Db1euIwL8Jo.HTA1UQXUu44OgkGL3O/qRbm', '2015-12-23 23:49:43.000000', '2015-12-30 23:49:43', '2015-12-30 23:49:43', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:49:43.479509"], ["updated_at", "2015-12-30 23:49:43.479509"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:40.433465') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:40.433465') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.3ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:49:43.495011"], ["updated_at", "2015-12-30 23:49:43.495011"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:40.490088') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:40.490088') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:49:43.507949"], ["updated_at", "2015-12-30 23:49:43.507949"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.7ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:40.504188') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (1.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:49:43.524615"], ["updated_at", "2015-12-30 23:49:43.524615"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:40.514876') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:40.514876') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:40.516516') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.9ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:40.516516') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:49:43.538437"], ["updated_at", "2015-12-30 23:49:43.538437"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.5ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:40.536068') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.5ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:40.536068') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$nwv.QTNHanG6FhZmY.QP9ORXXRhO2iFaCFkbGFkqhRHj1Y1JHtA5W', '2015-12-30 23:49:59', '2015-12-30 23:49:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$IhsuEQYYXZ3Xl9YbVs0fYuR25g.gxauONr4hoDl5wntKrJfWUWf5O', '2015-12-30 23:49:59', '2015-12-30 23:49:59', 298486374) Fixture Delete (0.2ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-29 23:49:59.000000', '2015-12-30 23:49:59', '2015-12-30 23:49:59', 980190962, 668453117) Fixture Delete (0.1ms) DELETE FROM "users" Fixture Insert (0.2ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$/pZiBOmsdA.52H71tlMh1eBPuCS0HDB.3GlrtBHdj1xO94sFYW0gC', '2015-12-23 23:49:59.000000', '2015-12-30 23:49:59', '2015-12-30 23:49:59', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:49:59.165252"], ["updated_at", "2015-12-30 23:49:59.165252"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:56.131236') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:56.131236') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:49:59.184968"], ["updated_at", "2015-12-30 23:49:59.184968"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:56.176192') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:56.176192') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:49:59.196168"], ["updated_at", "2015-12-30 23:49:59.196168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:56.192757') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:49:59.206968"], ["updated_at", "2015-12-30 23:49:59.206968"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.6ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:56.202641') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:56.202641') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:56.203934') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:56.203934') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.4ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:49:59.224703"], ["updated_at", "2015-12-30 23:49:59.224703"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:56.219676') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:49:56.219676') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.3ms) SELECT "articles".* FROM "articles" Started GET "/" for 127.0.0.1 at 2015-12-31 00:50:01 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.1ms) Rendered layouts/_flash.html.erb (1.1ms) Completed 200 OK in 652ms (Views: 639.4ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:50:02 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:50:02 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:50:02 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:50:02 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:50:02 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (668453117) Rendered main/articles/_article_for_list.json.jbuilder (23.2ms) Rendered main/articles/index.json.jbuilder (47.6ms) Completed 500 Internal Server Error in 84ms (ActiveRecord: 1.2ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:50:02 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:50:02.846612') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "admins" Fixture Insert (0.3ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$M2zy.38aFF1afk2SmADgjeQ2l4GVCGHxVdkJyWsX9FhdSf3z/3.Te', '2015-12-30 23:50:34', '2015-12-30 23:50:34', 980190962) Fixture Insert (0.4ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$N1hhBAPU3X1Y9Yh/8mG4x.azChBGf6m5u8C6dzZX38oL3WZX.FvGa', '2015-12-30 23:50:34', '2015-12-30 23:50:34', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.3ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-29 23:50:34.000000', '2015-12-30 23:50:34', '2015-12-30 23:50:34', 980190962, 668453117) Fixture Delete (0.3ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$yI3e6cCFhlTyd7mOxcAj/Otz.m58lxCsEUVbu.DSvwazfURc9i5c.', '2015-12-23 23:50:34.000000', '2015-12-30 23:50:34', '2015-12-30 23:50:34', 980190962)  (2.7ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1 User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 668453117]] Started GET "/" for 127.0.0.1 at 2015-12-31 00:50:37 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.8ms) Rendered layouts/_flash.html.erb (1.3ms) Completed 200 OK in 770ms (Views: 757.1ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:50:38 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:50:38 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:50:38 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:50:38 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:50:38 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (668453117) Rendered main/articles/_article_for_list.json.jbuilder (30.6ms) Rendered main/articles/index.json.jbuilder (48.1ms) Completed 500 Internal Server Error in 88ms (ActiveRecord: 1.1ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:50:38 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:50:38.446769') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$pj0Jt/vOMykUIPin5Xxq1.kK54pUf2atFJSM7yO2bL0v1O.7SpJlO', '2015-12-30 23:50:38', '2015-12-30 23:50:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$pc1MOybFqnRZoy.HBQspjOHrYGHHLd42fplkytdNUU0ibL2xpYY/W', '2015-12-30 23:50:38', '2015-12-30 23:50:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-29 23:50:38.000000', '2015-12-30 23:50:38', '2015-12-30 23:50:38', 980190962, 668453117) Fixture Delete (0.1ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$6bcEJZ3ghB9/IQeryBrfnOM0yXA9E3E5IcIsho4CqepQHgeJ1tCwW', '2015-12-23 23:50:38.000000', '2015-12-30 23:50:38', '2015-12-30 23:50:38', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.4ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:50:38.521742"], ["updated_at", "2015-12-30 23:50:38.521742"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:50:35.486441') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:50:35.486441') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:50:38.534014"], ["updated_at", "2015-12-30 23:50:38.534014"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:50:35.530810') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.4ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:50:38.544290"], ["updated_at", "2015-12-30 23:50:38.544290"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:50:35.540267') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:50:35.540267') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:50:38.554964"], ["updated_at", "2015-12-30 23:50:38.554964"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:50:35.550569') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:50:35.550569') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:50:35.551928') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:50:35.551928') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:50:38.567484"], ["updated_at", "2015-12-30 23:50:38.567484"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:50:35.564981') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:50:35.564981') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "admins" Fixture Insert (0.6ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$1.S37Gnbo.qzqTkE6936weNhEvCgOuwpYoKM38CKoXpZ9wSs7M/32', '2015-12-30 23:51:18', '2015-12-30 23:51:18', 980190962) Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$xhb4aiMbDqOGNqGpcOkz2uFY9krxIfMVUwhByp9m4/ZAeeFbnFO5y', '2015-12-30 23:51:18', '2015-12-30 23:51:18', 298486374) Fixture Delete (0.6ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "user_id", "published_at", "created_at", "updated_at", "id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', 0, '2015-12-29 23:51:18.000000', '2015-12-30 23:51:18', '2015-12-30 23:51:18', 980190962) Fixture Delete (0.4ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$AoTWkI8xpp8fJQnCkiR1T.tzBaEk1Nzq234cWN9GixivBzhoFiZH.', '2015-12-23 23:51:18.000000', '2015-12-30 23:51:18', '2015-12-30 23:51:18', 980190962)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:51:18.509414"], ["updated_at", "2015-12-30 23:51:18.509414"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:15.480627') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:15.480627') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:51:18.530612"], ["updated_at", "2015-12-30 23:51:18.530612"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:15.520113') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:15.520113') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:15.527293') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:15.527293') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:51:18.542010"], ["updated_at", "2015-12-30 23:51:18.542010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:15.539163') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:15.539163') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:51:18.551343"], ["updated_at", "2015-12-30 23:51:18.551343"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:15.548498') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:51:18.561474"], ["updated_at", "2015-12-30 23:51:18.561474"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:15.556695') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:15.556695') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.2ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 0]] Started GET "/" for 127.0.0.1 at 2015-12-31 00:51:21 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.3ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 687ms (Views: 673.6ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:51:22 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:51:22 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:51:22 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:51:22 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:51:22 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.6ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (0) Rendered main/articles/_article_for_list.json.jbuilder (24.2ms) Rendered main/articles/index.json.jbuilder (42.1ms) Completed 500 Internal Server Error in 82ms (ActiveRecord: 1.5ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:51:22 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:22.637713') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$GgyS7Dy1XMFYov9t/zquuOqb6nJbG8eb.tD2nrgOZ01ClvOPM0TiS', '2015-12-30 23:51:53', '2015-12-30 23:51:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$BrTLLs2argKwHJieLcgpqObR1n7.Eqrvet4AWckAmjC5Yae1CJJ1q', '2015-12-30 23:51:53', '2015-12-30 23:51:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-29 23:51:53.000000', '2015-12-30 23:51:53', '2015-12-30 23:51:53', 980190962, 668453117) Fixture Delete (0.1ms) DELETE FROM "users" Fixture Insert (0.2ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$3fIDP6hKAC0UlsxfElh4/.rDIdg3k9hHgdbXct/fUi0mlOdud/3bK', '2015-12-23 23:51:53.000000', '2015-12-30 23:51:53', '2015-12-30 23:51:53', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.3ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" Started GET "/" for 127.0.0.1 at 2015-12-31 00:51:56 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.3ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 613ms (Views: 600.1ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:51:57 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:51:57 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:51:57 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:51:57 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:51:57 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (668453117) Rendered main/articles/_article_for_list.json.jbuilder (26.8ms) Rendered main/articles/index.json.jbuilder (54.7ms) Completed 500 Internal Server Error in 107ms (ActiveRecord: 1.2ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:51:57 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:57.363383') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 15ms (Views: 0.3ms | ActiveRecord: 0.4ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$DZIDKtuz5d6mRrTAMV1sYuA7uhZsFZuKKZdDZX7hIk7yH1vg1Vdb.', '2015-12-30 23:51:57', '2015-12-30 23:51:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$LHgDe2eOv.TMyxSU4SDgOeHqO5uaxReIsQCIFoUtotY94IeDWMmJe', '2015-12-30 23:51:57', '2015-12-30 23:51:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-29 23:51:57.000000', '2015-12-30 23:51:57', '2015-12-30 23:51:57', 980190962, 668453117) Fixture Delete (0.1ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$MAwRB4NSTA5AMqPUy/FheedScz0irVTriNL7xWtipHM.VBFqubsgK', '2015-12-23 23:51:57.000000', '2015-12-30 23:51:57', '2015-12-30 23:51:57', 980190962)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:51:57.438971"], ["updated_at", "2015-12-30 23:51:57.438971"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:54.413656') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:51:57.450068"], ["updated_at", "2015-12-30 23:51:57.450068"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:54.445870') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:54.445870') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:54.447067') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:54.447067') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:51:57.461978"], ["updated_at", "2015-12-30 23:51:57.461978"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:54.459802') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:54.459802') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:51:57.473282"], ["updated_at", "2015-12-30 23:51:57.473282"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:54.469060') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.9ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:54.469060') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.6ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:51:57.485905"], ["updated_at", "2015-12-30 23:51:57.485905"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:54.482084') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:51:54.482084') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.6ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$F0izmSdTz.bHIGsP5AcEpuvhcbaPbWLAjNhRLbLVt1iJROBaHK20.', '2015-12-30 23:53:24', '2015-12-30 23:53:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$wC77r/DZmIIZLzhNWPWK4uBGxyxn.5CIPOxk9QLpuq0XmJJgSmSGq', '2015-12-30 23:53:24', '2015-12-30 23:53:24', 298486374) Fixture Delete (0.5ms) DELETE FROM "articles" Fixture Insert (0.3ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-29 23:53:24.000000', '2015-12-30 23:53:24', '2015-12-30 23:53:24', 980190962, 872278135) Fixture Delete (0.5ms) DELETE FROM "users" Fixture Insert (0.2ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$EAGiNCiiZdKSvUt8Til.6Op/OPdjFVMeRhmmJvHvQlJ/xlb8E/Cm6', '2015-12-23 23:53:24.000000', '2015-12-30 23:53:24', '2015-12-30 23:53:24', 872278135)  (1.0ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:53:24.985284"], ["updated_at", "2015-12-30 23:53:24.985284"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:53:21.944312') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:53:21.944312') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:53:24.997515"], ["updated_at", "2015-12-30 23:53:24.997515"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:53:21.994126') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:53:21.994126') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:53:21.995117') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:53:21.995117') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:53:25.007454"], ["updated_at", "2015-12-30 23:53:25.007454"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:53:22.005690') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:53:22.005690') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:53:25.015905"], ["updated_at", "2015-12-30 23:53:25.015905"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:53:22.013271') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:53:25.023591"], ["updated_at", "2015-12-30 23:53:25.023591"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:53:22.020667') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:53:22.020667') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Article Load (0.4ms) SELECT "articles".* FROM "articles" ORDER BY "articles"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" Started GET "/" for 127.0.0.1 at 2015-12-31 00:53:28 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.3ms) Rendered layouts/_flash.html.erb (1.4ms) Completed 200 OK in 628ms (Views: 616.2ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:53:29 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:53:29 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:53:29 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:53:29 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:53:29 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.5ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (872278135)  (0.2ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."article_id" = ? [["article_id", 980190962]] Rendered main/articles/_article_for_list.json.jbuilder (19.7ms) Rendered main/articles/index.json.jbuilder (48.5ms) Completed 200 OK in 85ms (Views: 80.8ms | ActiveRecord: 1.6ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:53:29 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:53:29.308922') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "admins" Fixture Insert (0.4ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$UPoDav0L7VojZk85ZKVGtu0.vnaSYpVLRAeL94ewDmGomUKhFal6W', '2015-12-30 23:53:56', '2015-12-30 23:53:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$0BleCNSXmIHlvbc/znY5zOA4XC8O7cAXC6iWPw5sTUNc8u03FWu3a', '2015-12-30 23:53:56', '2015-12-30 23:53:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-29 23:53:56.000000', '2015-12-30 23:53:56', '2015-12-30 23:53:56', 289431703, 872278135) Fixture Delete (0.1ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$yGIgeTXu7bHW5vm7vWqmp.LO52wSD0oiBpoKWEyYNRX5VvHU86HIa', '2015-12-23 23:53:56.000000', '2015-12-30 23:53:56', '2015-12-30 23:53:56', 872278135)  (2.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions -------------------------------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token -------------------------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Started GET "/" for 127.0.0.1 at 2015-12-31 00:53:59 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.2ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 550ms (Views: 538.1ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:53:59 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:53:59 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:53:59 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:53:59 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:53:59 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.5ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (872278135)  (0.4ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."article_id" = ? [["article_id", 289431703]] Rendered main/articles/_article_for_list.json.jbuilder (35.0ms) Rendered main/articles/index.json.jbuilder (85.1ms) Completed 200 OK in 121ms (Views: 116.0ms | ActiveRecord: 2.5ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:53:59 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:54:00.013813') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$eYB5ZzACJ0LfMbSmIFygOefPhsO9sFM5LXVs59b8ACsuPws/xSU4K', '2015-12-30 23:54:00', '2015-12-30 23:54:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$LDCAFGGmcQp10gn6SjZw0O8uVjRYe2mZfIAs78siV4z9PY.9ZO6P2', '2015-12-30 23:54:00', '2015-12-30 23:54:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-29 23:54:00.000000', '2015-12-30 23:54:00', '2015-12-30 23:54:00', 289431703, 872278135) Fixture Delete (0.1ms) DELETE FROM "users" Fixture Insert (0.6ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$SnpSlO0OUgINppZXBhurUOzrTJztsFLAePcU4BqTe9VJEEmRKi.b2', '2015-12-23 23:54:00.000000', '2015-12-30 23:54:00', '2015-12-30 23:54:00', 872278135)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.3ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$dnz.c/TwOhIV/6taWBbGx.iqWS7GUpY6YMDuc5.Xc8P3wIYg6LkcG', '2015-12-30 23:54:19', '2015-12-30 23:54:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$jAbabmSL/qZJk9uYzsl8d.frb2sKlPcsviGASIlKsVRRin.I8IEB6', '2015-12-30 23:54:19', '2015-12-30 23:54:19', 298486374) Fixture Delete (0.2ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-29 23:54:19.000000', '2015-12-30 23:54:19', '2015-12-30 23:54:19', 980190962, 872278135) Fixture Delete (0.2ms) DELETE FROM "users" Fixture Insert (0.2ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$8OLm5qTPnLGmSGlbl1gLuuygsfOms4C5stho8gYEnuqe9iDmnz8CS', '2015-12-23 23:54:19.000000', '2015-12-30 23:54:19', '2015-12-30 23:54:19', 872278135)  (1.3ms) commit transaction  (0.3ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Started GET "/" for 127.0.0.1 at 2015-12-31 00:54:22 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.9ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 501ms (Views: 488.3ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 00:54:22 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 00:54:22 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 00:54:22 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 00:54:22 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 00:54:22 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.5ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.5ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (872278135)  (0.2ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."article_id" = ? [["article_id", 980190962]] Rendered main/articles/_article_for_list.json.jbuilder (33.1ms) Rendered main/articles/index.json.jbuilder (79.1ms) Completed 200 OK in 123ms (Views: 112.2ms | ActiveRecord: 1.9ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 00:54:22 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:54:22.874189') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 6ms (Views: 0.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "admins" Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$aeM8387E/Ue/JzzAYnUOUeb/m8ZQVq5Bhr4j/w7peMr9KxGP9SvsG', '2015-12-30 23:54:22', '2015-12-30 23:54:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$QRtL9ZLF8xuGiDs5GGSI6eN9CnVCr1FYYVjhoyAj0oNiHvAR6sWAC', '2015-12-30 23:54:22', '2015-12-30 23:54:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-29 23:54:22.000000', '2015-12-30 23:54:22', '2015-12-30 23:54:22', 980190962, 872278135) Fixture Delete (0.1ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$ZEAtC1tNqs2VmuR0VSlzZuDC./vFWwHHHtKyqAim3rae08xBx24ry', '2015-12-23 23:54:22.000000', '2015-12-30 23:54:22', '2015-12-30 23:54:22', 872278135)  (0.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-30 23:54:22.946960"], ["updated_at", "2015-12-30 23:54:22.946960"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:54:19.909691') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.7ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:54:19.909691') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.3ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:54:22.964550"], ["updated_at", "2015-12-30 23:54:22.964550"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:54:19.956079') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:54:19.956079') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-30 23:54:22.974644"], ["updated_at", "2015-12-30 23:54:22.974644"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:54:19.972715') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:54:19.972715') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-30 23:54:22.984968"], ["updated_at", "2015-12-30 23:54:22.984968"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:54:19.981789') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-30 23:54:22.995128"], ["updated_at", "2015-12-30 23:54:22.995128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:54:19.990084') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:54:19.990084') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:54:19.991693') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-30 23:54:19.991693') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.6ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$gD2yeH9IBe758q32b/NFduGcxIAoFHfQbt53e3oVhZ7LVeAMe5466', '2015-12-31 00:23:37', '2015-12-31 00:23:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$K1DHHIB2tJpKcX.1x7mZ1.tRo2r/UYY.H/UvsJEhTCcFZLe24nijS', '2015-12-31 00:23:37', '2015-12-31 00:23:37', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 00:23:37.000000', '2015-12-31 00:23:37', '2015-12-31 00:23:37', 980190962, 872278135) Fixture Delete (0.3ms) DELETE FROM "users" Fixture Insert (0.2ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$vLowtxR.lIp.1vuWWf.x1.2xe3ItgPzaIypDPnJF6CpMnAt2Vp9aO', '2015-12-24 00:23:37.000000', '2015-12-31 00:23:37', '2015-12-31 00:23:37', 872278135)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-31 00:23:38.013654"], ["updated_at", "2015-12-31 00:23:38.013654"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:23:34.981547') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:23:34.981547') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-31 00:23:38.028362"], ["updated_at", "2015-12-31 00:23:38.028362"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:23:35.021756') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:23:35.021756') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:23:35.025886') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:23:35.025886') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-31 00:23:38.037231"], ["updated_at", "2015-12-31 00:23:38.037231"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:23:35.034726') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:23:35.034726') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-31 00:23:38.045775"], ["updated_at", "2015-12-31 00:23:38.045775"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:23:35.041958') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:23:35.041958') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-31 00:23:38.053199"], ["updated_at", "2015-12-31 00:23:38.053199"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:23:35.050704') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------ NavigationTest: test_the_truth ------------------------------ Started GET "/" for 127.0.0.1 at 2015-12-31 01:23:40 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (4.9ms) Rendered layouts/_flash.html.erb (1.3ms) Completed 200 OK in 649ms (Views: 636.0ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 01:23:41 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 01:23:41 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 01:23:41 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 01:23:41 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 01:23:41 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Completed 500 Internal Server Error in 74ms (ActiveRecord: 0.4ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 01:23:41 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:23:41.768212') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "admins" Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$mkQMNqfqoMU2nxd0FgqBbOptHZkSOa3PmQCthJUPT6/0d3eRK0rAW', '2015-12-31 00:23:41', '2015-12-31 00:23:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$/Ee2KszYEiivaYvx236ijOocRiXFWehS.AXt.lZwbgxUfeddW33f6', '2015-12-31 00:23:41', '2015-12-31 00:23:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 00:23:41.000000', '2015-12-31 00:23:41', '2015-12-31 00:23:41', 980190962, 872278135) Fixture Delete (0.1ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$qu1lUTl.PdggDi2C5zo.a.gLstbaECFhjvQPgEs7uEVMSNEB73WSy', '2015-12-24 00:23:41.000000', '2015-12-31 00:23:41', '2015-12-31 00:23:41', 872278135)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$HDJPV3G1siT3UItx6m3zRu20QUbQp74NcSbufiizRIBxFdbX3i60q', '2015-12-31 00:36:28', '2015-12-31 00:36:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$zT.K5.kF8vIjsZGg8UNT1O3FU3Z7dFChd/fiZoj5gyq.zYB9epaXS', '2015-12-31 00:36:28', '2015-12-31 00:36:28', 298486374) Fixture Delete (0.7ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 00:36:28.000000', '2015-12-31 00:36:28', '2015-12-31 00:36:28', 980190962, 872278135) Fixture Delete (0.4ms) DELETE FROM "users" Fixture Insert (0.2ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$qyL/rH2dCMCIz3SS3dZvI.OLSojG0V3QTNyNE3mQjLCG/CZA.Sz02', '2015-12-24 00:36:28.000000', '2015-12-31 00:36:28', '2015-12-31 00:36:28', 872278135)  (1.3ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-31 00:36:28.972490"], ["updated_at", "2015-12-31 00:36:28.972490"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:36:25.943174') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-31 00:36:28.982648"], ["updated_at", "2015-12-31 00:36:28.982648"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:36:25.979896') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:36:25.979896') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:36:25.980738') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:36:25.980738') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-31 00:36:28.992568"], ["updated_at", "2015-12-31 00:36:28.992568"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:36:25.989767') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:36:25.989767') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-31 00:36:29.001096"], ["updated_at", "2015-12-31 00:36:29.001096"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:36:25.998053') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:36:25.998053') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-31 00:36:29.008757"], ["updated_at", "2015-12-31 00:36:29.008757"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:36:26.005717') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:36:26.005717') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------- MainPageTest: test_should_async_load_articles --------------------------------------------- Started GET "/" for 127.0.0.1 at 2015-12-31 01:36:31 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.7ms) Rendered layouts/_flash.html.erb (1.1ms) Completed 200 OK in 617ms (Views: 605.6ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 01:36:32 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 01:36:32 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 01:36:32 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 01:36:32 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 01:36:32 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.5ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (872278135)  (0.2ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."article_id" = ? [["article_id", 980190962]] Rendered main/articles/_article_for_list.json.jbuilder (16.6ms) Rendered main/articles/index.json.jbuilder (48.8ms) Completed 200 OK in 81ms (Views: 77.2ms | ActiveRecord: 1.5ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 01:36:32 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:36:32.634037') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$a9M1ovxxCuC4IT/ZkV/9gu/9M.4pB4f3ou6C0Ytv8ZxDiwae.yqzS', '2015-12-31 00:37:44', '2015-12-31 00:37:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$5v4xWfpngMo8p4L9WH365.uT.0VcbO.HDu4uAzI7b2/8vv/ydJcrO', '2015-12-31 00:37:44', '2015-12-31 00:37:44', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.3ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 00:37:44.000000', '2015-12-31 00:37:44', '2015-12-31 00:37:44', 980190962, 872278135) Fixture Delete (0.3ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$9V9ZqjbFLKeI09MArEPy2uc.2XI8hUfNtzlxgxt8mqzGq8VXi.TDq', '2015-12-24 00:37:44.000000', '2015-12-31 00:37:44', '2015-12-31 00:37:44', 872278135)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------- MainPageTest: test_should_async_load_articles --------------------------------------------- Started GET "/" for 127.0.0.1 at 2015-12-31 01:37:46 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.8ms) Rendered layouts/_flash.html.erb (1.4ms) Completed 200 OK in 556ms (Views: 545.2ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 01:37:47 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 01:37:47 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 01:37:47 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 01:37:47 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 01:37:47 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (872278135)  (0.2ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."article_id" = ? [["article_id", 980190962]] Rendered main/articles/_article_for_list.json.jbuilder (26.9ms) Rendered main/articles/index.json.jbuilder (79.7ms) Completed 200 OK in 118ms (Views: 109.5ms | ActiveRecord: 1.9ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 01:37:47 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:37:47.696408') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 7ms (Views: 0.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "admins" Fixture Insert (0.3ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$3U4WsTmBYKHgngQePs38B.2j/O5UA9bLJBNXhL63sVeBrLZHFRVLa', '2015-12-31 00:37:47', '2015-12-31 00:37:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$JYctCEW98AAtTKYYBOlfzO7sCb8rM3BnMpQF3Ky2IR868cJM/le6.', '2015-12-31 00:37:47', '2015-12-31 00:37:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 00:37:47.000000', '2015-12-31 00:37:47', '2015-12-31 00:37:47', 980190962, 872278135) Fixture Delete (0.1ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$LWkty0RehQV7Sb.ECoOJJ.3uMYQD4h2nwSmITbPwPpaPT.qfpERBy', '2015-12-24 00:37:47.000000', '2015-12-31 00:37:47', '2015-12-31 00:37:47', 872278135)  (0.9ms) commit transaction  (0.3ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-31 00:37:47.747683"], ["updated_at", "2015-12-31 00:37:47.747683"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.6ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:37:44.728569') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:37:44.728569') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-31 00:37:47.766310"], ["updated_at", "2015-12-31 00:37:47.766310"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:37:44.757951') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:37:44.757951') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:37:44.763852') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:37:44.763852') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-31 00:37:47.776412"], ["updated_at", "2015-12-31 00:37:47.776412"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:37:44.773350') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:37:44.773350') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-31 00:37:47.784745"], ["updated_at", "2015-12-31 00:37:47.784745"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:37:44.781815') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:37:44.781815') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-31 00:37:47.792799"], ["updated_at", "2015-12-31 00:37:47.792799"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:37:44.790102') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$37EvMtWocDstgJ9tJU5ttOvo3hOXrAaGHVOgw/Z7UBGJ7kO.Lyf/S', '2015-12-31 00:40:43', '2015-12-31 00:40:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$5W6LnDizuCoDgCBH8Z1bT.qkJRrr9EVVWWv.vNtnAY2R3oAw8OdnO', '2015-12-31 00:40:43', '2015-12-31 00:40:43', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 00:40:43.000000', '2015-12-31 00:40:43', '2015-12-31 00:40:43', 980190962, 872278135) Fixture Delete (0.3ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$ZRrDv/73vFPn/v46BYLLlul6kqO85wpMICJ2rkFR6ayfIPFXs/4Iu', '2015-12-24 00:40:43.000000', '2015-12-31 00:40:43', '2015-12-31 00:40:43', 872278135)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.4ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-31 00:40:43.698795"], ["updated_at", "2015-12-31 00:40:43.698795"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:40:40.668540') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-31 00:40:43.707771"], ["updated_at", "2015-12-31 00:40:43.707771"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:40:40.705747') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:40:40.705747') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-31 00:40:43.715335"], ["updated_at", "2015-12-31 00:40:43.715335"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:40:40.712698') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:40:40.712698') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-31 00:40:43.722072"], ["updated_at", "2015-12-31 00:40:43.722072"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:40:40.719694') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:40:40.719694') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:40:40.720466') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:40:40.720466') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-31 00:40:43.731574"], ["updated_at", "2015-12-31 00:40:43.731574"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:40:40.729007') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:40:40.729007') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------- MainPageTest: test_should_async_load_articles --------------------------------------------- Started GET "/" for 127.0.0.1 at 2015-12-31 01:40:46 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.7ms) Rendered layouts/_flash.html.erb (1.3ms) Completed 200 OK in 596ms (Views: 583.7ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 01:40:47 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 01:40:47 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 01:40:47 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 01:40:47 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 01:40:47 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (872278135)  (0.2ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."article_id" = ? [["article_id", 980190962]] Rendered main/articles/_article_for_list.json.jbuilder (17.4ms) Rendered main/articles/index.json.jbuilder (54.8ms) Completed 200 OK in 89ms (Views: 85.3ms | ActiveRecord: 1.5ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 01:40:47 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:40:47.458961') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "admins" Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$nchghBIFLBPUka5H8E8.zOZ5Sx5b.wYCTD.SFFme0SvH.k6rOiZpK', '2015-12-31 00:40:47', '2015-12-31 00:40:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$pF8G9spppaZOk7OJvRYn9.uw1tbSZ8BIP0WOLyWZFsC3bxWO7Xupe', '2015-12-31 00:40:47', '2015-12-31 00:40:47', 298486374) Fixture Delete (0.2ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 00:40:47.000000', '2015-12-31 00:40:47', '2015-12-31 00:40:47', 980190962, 872278135) Fixture Delete (0.2ms) DELETE FROM "users" Fixture Insert (0.2ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$AgpCu6KHNgPsSD.kQguFXOas3R0phPj5t9aiReZObn9um.e/TIrxi', '2015-12-24 00:40:47.000000', '2015-12-31 00:40:47', '2015-12-31 00:40:47', 872278135)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.7ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$RsJ3SyZs5YFun4eT0Ew0UOVcwCR2cq8x6niLHYoXeX2jp5yfQ4ZaS', '2015-12-31 00:42:59', '2015-12-31 00:42:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$T9E30.dGRUmn7BSNtR1Bueu8kl5wQu3AS6Di/uUpmcFAcSEJmPgn.', '2015-12-31 00:42:59', '2015-12-31 00:42:59', 298486374) Fixture Delete (0.6ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 00:42:59.000000', '2015-12-31 00:42:59', '2015-12-31 00:42:59', 980190962, 872278135) Fixture Delete (0.4ms) DELETE FROM "users" Fixture Insert (0.3ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$zjN6eeEaaVzv5b3Jact4Cemp3PVAyxWjzzKT.AQxMBjU1gS2eEOFG', '2015-12-24 00:42:59.000000', '2015-12-31 00:42:59', '2015-12-31 00:42:59', 872278135)  (1.2ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-31 00:42:59.891798"], ["updated_at", "2015-12-31 00:42:59.891798"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:42:56.866783') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:42:56.866783') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-31 00:42:59.906551"], ["updated_at", "2015-12-31 00:42:59.906551"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:42:56.899550') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:42:56.899550') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:42:56.903636') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:42:56.903636') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-31 00:42:59.917104"], ["updated_at", "2015-12-31 00:42:59.917104"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:42:56.914547') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:42:56.914547') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-31 00:42:59.925268"], ["updated_at", "2015-12-31 00:42:59.925268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:42:56.922526') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:42:56.922526') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-31 00:42:59.931955"], ["updated_at", "2015-12-31 00:42:59.931955"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:42:56.929932') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------- MainPageTest: test_should_async_load_articles --------------------------------------------- Started GET "/" for 127.0.0.1 at 2015-12-31 01:43:02 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (3.9ms) Rendered layouts/_flash.html.erb (0.6ms) Completed 200 OK in 747ms (Views: 724.2ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 01:43:03 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 01:43:03 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 01:43:03 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 01:43:03 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 01:43:03 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (872278135)  (0.2ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."article_id" = ? [["article_id", 980190962]] Rendered main/articles/_article_for_list.json.jbuilder (23.8ms) Rendered main/articles/index.json.jbuilder (53.2ms) Completed 200 OK in 87ms (Views: 83.2ms | ActiveRecord: 1.6ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 01:43:03 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:43:03.673364') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$Jcpn3w2xkR93nGmRlqUWRuFYljM1P7OFgaPc9RmjGndtKcTW4wlxu', '2015-12-31 00:44:38', '2015-12-31 00:44:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$99O0GElBy1t2BVoW78XK7OGS8cb8lCiBuK0/fulMaot43vmR/jbHm', '2015-12-31 00:44:38', '2015-12-31 00:44:38', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 00:44:38.000000', '2015-12-31 00:44:38', '2015-12-31 00:44:38', 980190962, 872278135) Fixture Delete (0.4ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$baRadazO0ml7NEEmDOaJoeINW9rg4LKdnx/yJD3YOmgd0uqAjGRpi', '2015-12-24 00:44:38.000000', '2015-12-31 00:44:38', '2015-12-31 00:44:38', 872278135)  (0.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------- MainPageTest: test_should_async_load_articles --------------------------------------------- Started GET "/" for 127.0.0.1 at 2015-12-31 01:44:40 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (4.8ms) Rendered layouts/_flash.html.erb (1.2ms) Completed 200 OK in 533ms (Views: 520.1ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2015-12-31 01:44:41 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2015-12-31 01:44:41 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2015-12-31 01:44:41 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2015-12-31 01:44:41 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2015-12-31 01:44:41 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.5ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (872278135)  (0.2ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."article_id" = ? [["article_id", 980190962]] Rendered main/articles/_article_for_list.json.jbuilder (21.5ms) Rendered main/articles/index.json.jbuilder (83.6ms) Completed 200 OK in 124ms (Views: 112.8ms | ActiveRecord: 1.6ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2015-12-31 01:44:41 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:44:41.649597') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 6ms (Views: 0.2ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "admins" Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$n6dFpg8sHX2.pNTecVAKS.xRegNfyHJ.FlkxoUDWaKTj5s/E2eXJq', '2015-12-31 00:44:41', '2015-12-31 00:44:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$D/hYZz2LqfVtgo8bTlLs8OxLFlq4WHR/7VHnq3Au5a0F2QFjF0062', '2015-12-31 00:44:41', '2015-12-31 00:44:41', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-30 00:44:41.000000', '2015-12-31 00:44:41', '2015-12-31 00:44:41', 980190962, 872278135) Fixture Delete (0.1ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$HgTq77iGzlhrOkXcf5Jw9O1o/tZIINNtNtg1ytGGfRD5z7R0BeQMG', '2015-12-24 00:44:41.000000', '2015-12-31 00:44:41', '2015-12-31 00:44:41', 872278135)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2015-12-31 00:44:41.696840"], ["updated_at", "2015-12-31 00:44:41.696840"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.5ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:44:38.675496') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.6ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:44:38.675496') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.4ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2015-12-31 00:44:41.715065"], ["updated_at", "2015-12-31 00:44:41.715065"]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:44:38.706293') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:44:38.706293') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:44:38.712169') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:44:38.712169') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.6ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-31 00:44:41.727919"], ["updated_at", "2015-12-31 00:44:41.727919"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:44:38.724956') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.7ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2015-12-31 00:44:41.737133"], ["updated_at", "2015-12-31 00:44:41.737133"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:44:38.733657') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:44:38.733657') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.6ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2015-12-31 00:44:41.746458"], ["updated_at", "2015-12-31 00:44:41.746458"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:44:38.743682') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2015-12-31 00:44:38.743682') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$Vd.gEFTwJw/wAVAbXut9eOnOjP.zrhjpgdaJ98UyeJEdqtBKZTDNS', '2016-01-01 11:39:43', '2016-01-01 11:39:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$G/PZmhvV5DaybWXu6gkrkOXv43MiRozyvfwgu9xDaLIYBU4V/MTEy', '2016-01-01 11:39:43', '2016-01-01 11:39:43', 298486374) Fixture Delete (0.4ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2015-12-31 11:39:42.000000', '2016-01-01 11:39:43', '2016-01-01 11:39:43', 980190962, 872278135) Fixture Delete (0.3ms) DELETE FROM "users" Fixture Insert (0.2ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$k/X/Lb.KOapUT6FB0kqUguJ36HB7ETdw6WQxAqAM8.SpYFAyRRZ7y', '2015-12-25 11:39:43.000000', '2016-01-01 11:39:43', '2016-01-01 11:39:43', 872278135)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.3ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2016-01-01 11:39:43.062678"], ["updated_at", "2016-01-01 11:39:43.062678"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-01 11:39:40.032093') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-01 11:39:40.032093') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-01 11:39:40.043318') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-01 11:39:40.043318') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.7ms) rollback transaction  (0.3ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2016-01-01 11:39:43.077125"], ["updated_at", "2016-01-01 11:39:43.077125"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-01 11:39:40.073948') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-01 11:39:40.073948') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2016-01-01 11:39:43.083845"], ["updated_at", "2016-01-01 11:39:43.083845"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-01 11:39:40.081863') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2016-01-01 11:39:43.091960"], ["updated_at", "2016-01-01 11:39:43.091960"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-01 11:39:40.087629') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-01 11:39:40.087629') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 10  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2016-01-01 11:39:43.098461"], ["updated_at", "2016-01-01 11:39:43.098461"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-01 11:39:40.096925') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Loco::Notification Load (0.1ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-01 11:39:40.096925') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 10 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------- MainPageTest: test_should_async_load_articles --------------------------------------------- Started GET "/" for 127.0.0.1 at 2016-01-01 12:39:46 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (4.0ms) Rendered layouts/_flash.html.erb (1.3ms) Completed 200 OK in 2257ms (Views: 2245.3ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2016-01-01 12:39:48 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2016-01-01 12:39:48 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2016-01-01 12:39:48 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2016-01-01 12:39:48 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2016-01-01 12:39:49 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (872278135)  (0.5ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."article_id" = ? [["article_id", 980190962]] Rendered main/articles/_article_for_list.json.jbuilder (22.5ms) Rendered main/articles/index.json.jbuilder (55.8ms) Completed 200 OK in 90ms (Views: 85.1ms | ActiveRecord: 2.0ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2016-01-01 12:39:49 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-01 11:39:49.166613') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 10 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms)  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "admins" Fixture Insert (0.4ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$CgGAqiFCxxNWPubFYrlANOSjR6LxvyUHwTf61kz4uaM175EbVadqS', '2016-01-16 09:47:44', '2016-01-16 09:47:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$2rQ8BrSZo.EKKObmlP5Zc.8ThqNGirwd78SZEJwEoBN6dkOa5doJe', '2016-01-16 09:47:44', '2016-01-16 09:47:44', 298486374) Fixture Delete (0.3ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2016-01-15 09:47:44.000000', '2016-01-16 09:47:44', '2016-01-16 09:47:44', 980190962, 872278135) Fixture Delete (0.3ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$7HjMlyU1t7p7SLErg7X/HutT0Nh/6Kak/vOtE38zsuplIf2GIPqTW', '2016-01-09 09:47:44.000000', '2016-01-16 09:47:44', '2016-01-16 09:47:44', 872278135)  (0.7ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.4ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2016-01-16 09:47:45.040968"], ["updated_at", "2016-01-16 09:47:45.040968"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 09:47:41.975429') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 100 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 09:47:41.975429') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 100  (1.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2016-01-16 09:47:45.061319"], ["updated_at", "2016-01-16 09:47:45.061319"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 09:47:42.056403') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 100  (0.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2016-01-16 09:47:45.074766"], ["updated_at", "2016-01-16 09:47:45.074766"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 09:47:42.069014') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 100 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 09:47:42.069014') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 100 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 09:47:42.070700') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 100 Loco::Notification Load (0.4ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 09:47:42.070700') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 100  (0.6ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2016-01-16 09:47:45.094028"], ["updated_at", "2016-01-16 09:47:45.094028"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 09:47:42.088087') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 100 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 09:47:42.088087') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 100  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2016-01-16 09:47:45.107415"], ["updated_at", "2016-01-16 09:47:45.107415"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.5ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 09:47:42.103589') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 100 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 09:47:42.103589') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 100 [["recipient_token", "123qweasd"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------- MainPageTest: test_should_async_load_articles --------------------------------------------- Started GET "/" for 127.0.0.1 at 2016-01-16 10:47:47 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (2.8ms) Rendered layouts/_flash.html.erb (1.0ms) Completed 200 OK in 2526ms (Views: 2510.0ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2016-01-16 10:47:50 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2016-01-16 10:47:50 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2016-01-16 10:47:50 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2016-01-16 10:47:50 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2016-01-16 10:47:50 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (872278135)  (0.2ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."article_id" = ? [["article_id", 980190962]] Rendered main/articles/_article_for_list.json.jbuilder (23.0ms) Rendered main/articles/index.json.jbuilder (55.1ms) Completed 200 OK in 88ms (Views: 83.5ms | ActiveRecord: 1.8ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2016-01-16 10:47:50 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 09:47:50.381172') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 100 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms)  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "admins" Fixture Insert (0.5ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$9XQibOm/zaVWbPTFHOuL7uKlrzxB.sMGSkwpX.J0k1Cw/LcuV8fj6', '2016-01-16 14:11:11', '2016-01-16 14:11:11', 980190962) Fixture Insert (0.2ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$CeutfmXgfR0Kfh/iFQEy1usO.2PWyi/WBuiOJDIghYu5nGE6gO.pO', '2016-01-16 14:11:11', '2016-01-16 14:11:11', 298486374) Fixture Delete (0.5ms) DELETE FROM "articles" Fixture Insert (0.2ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2016-01-15 14:11:11.000000', '2016-01-16 14:11:11', '2016-01-16 14:11:11', 980190962, 872278135) Fixture Delete (0.4ms) DELETE FROM "users" Fixture Insert (0.2ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$vb6./8y0jzwkYCKeQwrqyuqVoe.nA5wCI4ccyKj54fzVhk2JsuNxy', '2016-01-09 14:11:11.000000', '2016-01-16 14:11:11', '2016-01-16 14:11:11', 872278135)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Loco::Notification::FetcherTest: test_fetching_with_recipient_token ------------------------------------------------------------------- Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_token", "123qweasd"], ["created_at", "2016-01-16 14:11:11.264348"], ["updated_at", "2016-01-16 14:11:11.264348"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 14:11:08.236060') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 100 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 14:11:08.236060') AND "loco_notifications"."recipient_token" = ? ORDER BY created_at ASC LIMIT 100 [["recipient_token", "123qweasd"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Loco::Notification::FetcherTest: test_pemissions_as_class --------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["created_at", "2016-01-16 14:11:11.280283"], ["updated_at", "2016-01-16 14:11:11.280283"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.5ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 14:11:08.273582') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 100 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 14:11:08.273582') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 100 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 14:11:08.277655') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 100 Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 14:11:08.277655') AND ((recipient_class = 'Admin' AND recipient_id = 298486374) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 100  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_without_passing_correct_permissions ------------------------------------------------------------------------------------------------------------------- Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2016-01-16 14:11:11.292263"], ["updated_at", "2016-01-16 14:11:11.292263"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 14:11:08.289751') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 100  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_return_addressed_notifications_when_passed_correct_permissions ----------------------------------------------------------------------------------------------------------- Admin Load (0.2ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 980190962], ["created_at", "2016-01-16 14:11:11.299773"], ["updated_at", "2016-01-16 14:11:11.299773"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 14:11:08.296316') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 100 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 14:11:08.296316') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 100  (0.4ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------------------------- Loco::Notification::FetcherTest: test_should_not_return_addressed_notifications_when_passed_incorrect_permissions ----------------------------------------------------------------------------------------------------------------- Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 980190962]] Admin Load (0.0ms) SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "loco_notifications" ("data", "event", "obj_class", "obj_id", "recipient_class", "recipient_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["data", "{\"id\":980190962}"], ["event", "published"], ["obj_class", "Article"], ["obj_id", 980190962], ["recipient_class", "Admin"], ["recipient_id", 298486374], ["created_at", "2016-01-16 14:11:11.307329"], ["updated_at", "2016-01-16 14:11:11.307329"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 14:11:08.304697') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 100 Loco::Notification Load (0.2ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 14:11:08.304697') AND ((recipient_class = 'Admin' AND recipient_id = 980190962) OR (recipient_class = 'Admin' AND recipient_id IS NULL)) ORDER BY created_at ASC LIMIT 100  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------- MainPageTest: test_should_async_load_articles --------------------------------------------- Started GET "/" for 127.0.0.1 at 2016-01-16 15:11:14 +0100 Processing by Main::PagesController#index as HTML Rendered main/pages/index.html.erb within layouts/application (4.5ms) Rendered layouts/_flash.html.erb (1.4ms) Completed 200 OK in 621ms (Views: 609.8ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2016-01-16 15:11:15 +0100 Started GET "/assets/application.js" for 127.0.0.1 at 2016-01-16 15:11:15 +0100 Started GET "/assets/scaffold.css" for 127.0.0.1 at 2016-01-16 15:11:15 +0100 Started GET "/assets/global.css" for 127.0.0.1 at 2016-01-16 15:11:15 +0100 Started GET "/articles?page=1" for 127.0.0.1 at 2016-01-16 15:11:15 +0100 Processing by Main::ArticlesController#index as JSON Parameters: {"page"=>"1"}  (0.4ms) SELECT COUNT(*) FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE ("articles"."published_at" IS NOT NULL) ORDER BY published_at DESC LIMIT 3 OFFSET 0 User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (872278135)  (0.6ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."article_id" = ? [["article_id", 980190962]] Rendered main/articles/_article_for_list.json.jbuilder (18.4ms) Rendered main/articles/index.json.jbuilder (54.4ms) Completed 200 OK in 93ms (Views: 88.8ms | ActiveRecord: 1.9ms) Started GET "/notification-center?synced_at=" for 127.0.0.1 at 2016-01-16 15:11:15 +0100 Processing by Loco::NotificationCenterController#index as */* Parameters: {"synced_at"=>""} Loco::Notification Load (0.3ms) SELECT "loco_notifications".* FROM "loco_notifications" WHERE (created_at > '2016-01-16 14:11:15.686772') AND "loco_notifications"."recipient_class" IS NULL AND "loco_notifications"."recipient_id" IS NULL AND "loco_notifications"."recipient_token" IS NULL ORDER BY created_at ASC LIMIT 100 Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "admins" Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@gmail.com', '$2a$04$.Hywjz8dDeI6MN/x8IuveOhKL6GFUgCrvJ9B7i.e8iA7dCS4ee5WG', '2016-01-16 14:11:15', '2016-01-16 14:11:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('zbigniew.humeniuk@motteq.com', '$2a$04$qSk2tCWS0ASd1dnu0zRR6ORGThKKbwQjMrGds3O715o9TbDjeUC4K', '2016-01-16 14:11:15', '2016-01-16 14:11:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "articles" Fixture Insert (0.1ms) INSERT INTO "articles" ("title", "text", "published_at", "created_at", "updated_at", "id", "user_id") VALUES ('A Guide to Testing Rails Applications', 'Testing support was woven into the Rails fabric from the beginning. It wasn''t an "oh! let''s bolt on support for running tests because they''re new and cool" epiphany. Just about every Rails application interacts heavily with a database and, as a result, your tests will need a database to interact with as well. To write efficient tests, you''ll need to understand how to set up this database and populate it with sample data.', '2016-01-15 14:11:15.000000', '2016-01-16 14:11:15', '2016-01-16 14:11:15', 980190962, 872278135) Fixture Delete (0.1ms) DELETE FROM "users" Fixture Insert (0.1ms) INSERT INTO "users" ("username", "email", "password_digest", "confirmed_at", "created_at", "updated_at", "id") VALUES ('zbig', 'zbigniew.humeniuk@example.com', '$2a$04$tjR3ZCa7pUArp9SwZoFt9.YFMMhpIXOhe7M1.wrpLao29DLhwL/2S', '2016-01-09 14:11:15.000000', '2016-01-16 14:11:15', '2016-01-16 14:11:15', 872278135)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------- LocoTest: test_truth --------------------  (0.0ms) rollback transaction