test/dummy/log/test.log in proposal-2.0.1 vs test/dummy/log/test.log in proposal-2.0.2

- old
+ new

@@ -13919,5 +13919,2387 @@ ProposalTest: test_should_validate_arguments_with_symbol_and_args ----------------------------------------------------------------- Proposal::Token Load (1.0ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:41.190954') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] Proposal::Token Exists (0.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:41.196748') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]]  (0.2ms) rollback transaction +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) begin transaction +--------------------------------------------- +ProposalTest: test_should_return_the_resource +--------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (22.0ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:50:05.038491"], ["updated_at", "2019-07-04 04:50:05.038491"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.7ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.125644') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_respond_to_the_recipient +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.7ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:50:05.159261"], ["updated_at", "2019-07-04 04:50:05.159261"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.160987') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_raise_error_if_remind_is_not_true +----------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.166137') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.167802') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------- +ProposalTest: test_should_create_valid_proposal_token +----------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.170067') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.171939') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (1.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "3NEca7qrQkRngySyAkRf"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:50:05.171093"], ["updated_at", "2019-07-04 04:50:05.172697"], ["created_at", "2019-07-04 04:50:05.172697"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbols +--------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.176418') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.178078') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------- +ProposalTest: test_user_should_have_proposal +-------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.179627') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------- +ProposalTest: test_should_return_all_arguments +---------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.181255') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.182716') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "SgspZy1yxeJHyps2wQvF"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n- admin\n- 1\n"], ["expires_at", "2019-07-05 04:50:05.182006"], ["updated_at", "2019-07-04 04:50:05.183768"], ["created_at", "2019-07-04 04:50:05.183768"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "SgspZy1yxeJHyps2wQvF"], ["LIMIT", 1]] +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------------ +ProposalTest: test_should_have_action_remind_for_invite_(new_user) +------------------------------------------------------------------ + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.189812') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.191848') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "XxzpAJRxtKy8dyMucHSx"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:50:05.190973"], ["updated_at", "2019-07-04 04:50:05.192746"], ["created_at", "2019-07-04 04:50:05.192746"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.193974') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_expired +---------------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.199561') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.201658') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.7ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "pDod5sRuAMUo87SAcCWD"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:50:05.200893"], ["updated_at", "2019-07-04 04:50:05.202468"], ["created_at", "2019-07-04 04:50:05.202468"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_accepted_safe +---------------------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.206160') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.207769') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "qjAxMLYsHNoTAqHx4QBz"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:50:05.207077"], ["updated_at", "2019-07-04 04:50:05.208424"], ["created_at", "2019-07-04 04:50:05.208424"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.7ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:50:05.210647"], ["accepted_at", "2019-07-04 04:50:05.210647"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_return_proposal_instance +-------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + User Create (0.3ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:50:05.214049"], ["updated_at", "2019-07-04 04:50:05.214049"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.215188') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.217542') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_proposer_instance +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.7ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:50:05.219989"], ["updated_at", "2019-07-04 04:50:05.219989"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.221887') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.223996') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "proposer_type", "proposer_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "iWBvnLAYxhisSEfgyTaj"], ["email", "user@example.com"], ["proposable_type", "User"], ["proposer_type", "User"], ["proposer_id", 1], ["expires_at", "2019-07-05 04:50:05.222847"], ["updated_at", "2019-07-04 04:50:05.224928"], ["created_at", "2019-07-04 04:50:05.224928"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposer_type" = ? AND "proposal_tokens"."proposer_id" = ? [["proposer_type", "User"], ["proposer_id", 1]] +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------- +ProposalTest: test_should_accept_a_resource +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.4ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:50:05.228156"], ["updated_at", "2019-07-04 04:50:05.228156"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.229250') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.230779') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "d1bmgEeS8KbVDxXXYRnr"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:50:05.230094"], ["updated_at", "2019-07-04 04:50:05.231489"], ["created_at", "2019-07-04 04:50:05.231489"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.1ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:50:05.232762"], ["updated_at", "2019-07-04 04:50:05.232762"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.233961') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.235692') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] + Proposal::Token Create (0.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "eTjgsGmzJ9sPJiyRY4zT"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["expires_at", "2019-07-05 04:50:05.234944"], ["updated_at", "2019-07-04 04:50:05.236664"], ["created_at", "2019-07-04 04:50:05.236664"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.238940') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +------------------------ +ProposalTest: test_truth +------------------------ +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------ +ProposalTest: test_should_return_hash_when_arguments_is_hash +------------------------------------------------------------ + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.241551') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.243191') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "CmvWGwDk4PGDxszpQpLF"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n:role: admin\n"], ["expires_at", "2019-07-05 04:50:05.242455"], ["updated_at", "2019-07-04 04:50:05.243837"], ["created_at", "2019-07-04 04:50:05.243837"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "CmvWGwDk4PGDxszpQpLF"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_find_and_accept_proposal +-------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + User Create (0.3ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:50:05.247964"], ["updated_at", "2019-07-04 04:50:05.247964"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.249099') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.251382') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "AjQBG1fEyypWwqpBDZHE"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:50:05.250213"], ["updated_at", "2019-07-04 04:50:05.252261"], ["created_at", "2019-07-04 04:50:05.252261"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "AjQBG1fEyypWwqpBDZHE"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:50:05.255088"], ["accepted_at", "2019-07-04 04:50:05.255088"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_accepted +----------------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.257181') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.258884') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "xSuMu5JU6ShqfGz2xsWs"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:50:05.258163"], ["updated_at", "2019-07-04 04:50:05.259570"], ["created_at", "2019-07-04 04:50:05.259570"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:50:05.260906"], ["accepted_at", "2019-07-04 04:50:05.260906"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------- +ProposalTest: test_should_not_return_no_action_if_accepted +---------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.262950') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.264833') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.6ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "8zsSrrdsvxjkVyypTQNy"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:50:05.264062"], ["updated_at", "2019-07-04 04:50:05.265527"], ["created_at", "2019-07-04 04:50:05.265527"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:50:05.267750"], ["accepted_at", "2019-07-04 04:50:05.267750"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_all_proposals_for_type +------------------------------------------------------- + Proposal::Token Load (0.7ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.270270') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.272715') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "m6QhHHjb8NQj9zYHi4oM"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:50:05.271911"], ["updated_at", "2019-07-04 04:50:05.273557"], ["created_at", "2019-07-04 04:50:05.273557"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? [["proposable_type", "User"]] +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_safe +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:50:05.276939"], ["updated_at", "2019-07-04 04:50:05.276939"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.278056') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.292105') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "pkPM7Kycyg6tU8S69iZH"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:50:05.291341"], ["updated_at", "2019-07-04 04:50:05.292824"], ["created_at", "2019-07-04 04:50:05.292824"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.293868') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:50:05.295453"], ["reminded_at", "2019-07-04 04:50:05.295453"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_a_proc +-------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.297256') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.298661') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------------- +ProposalTest: test_should_have_action_remind_for_notify_(existing_user) +----------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.5ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:50:05.300914"], ["updated_at", "2019-07-04 04:50:05.300914"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.302243') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.304183') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "xc6G1UDRWgfWtnAZwgFC"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:50:05.303243"], ["updated_at", "2019-07-04 04:50:05.305530"], ["created_at", "2019-07-04 04:50:05.305530"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.306962') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol +-------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.310186') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.311580') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_not_create_a_new_token_if_token_exists +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.313747') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "xdDQQRy3AmzyzSZtoZE7"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2020-07-04 04:50:05.313449"], ["updated_at", "2019-07-04 04:50:05.314487"], ["created_at", "2019-07-04 04:50:05.314487"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.316138') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_token_from_to_s_method +------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.318753') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.321345') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "wF1t11k49NjJvksfF4by"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:50:05.319981"], ["updated_at", "2019-07-04 04:50:05.322651"], ["created_at", "2019-07-04 04:50:05.322651"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------- +ProposalTest: test_should_respond_to_the_resource +------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.3ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:50:05.325236"], ["updated_at", "2019-07-04 04:50:05.325236"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.1ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:50:05.326528"], ["updated_at", "2019-07-04 04:50:05.326528"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.327421') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------ +ProposalTest: test_should_not_return_proposal_instance +------------------------------------------------------ + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.329710') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol_and_args +----------------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.332186') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.334482') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_bang +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.6ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:50:05.336801"], ["updated_at", "2019-07-04 04:50:05.336801"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.338793') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.340381') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "ocNrNwy7C9s3phjt3psH"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:50:05.339697"], ["updated_at", "2019-07-04 04:50:05.341012"], ["created_at", "2019-07-04 04:50:05.341012"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.342003') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:50:05.343676"], ["reminded_at", "2019-07-04 04:50:05.343676"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------------------- +ProposalTest: test_should_create_a_new_token_if_accepted_token_exists +--------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.3ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:50:05.345791"], ["updated_at", "2019-07-04 04:50:05.345791"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + User Create (0.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:50:05.347097"], ["updated_at", "2019-07-04 04:50:05.347097"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.347926') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.350028') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "XUzTkApssewDdtMBZHga"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:50:05.349005"], ["updated_at", "2019-07-04 04:50:05.351275"], ["created_at", "2019-07-04 04:50:05.351275"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:50:05.352564"], ["accepted_at", "2019-07-04 04:50:05.352564"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.353512') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.355870') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.1ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "zzCZUqAqvxmsh7ewSsgB"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:50:05.354713"], ["updated_at", "2019-07-04 04:50:05.356708"], ["created_at", "2019-07-04 04:50:05.356708"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_invite +----------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.358940') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.360352') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.361646') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_resource_instance +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.3ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:50:05.363717"], ["updated_at", "2019-07-04 04:50:05.363717"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.1ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:50:05.365019"], ["updated_at", "2019-07-04 04:50:05.365019"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.365819') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.367919') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "z9zmYpLjhLVUgNux431t"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:50:05.366989"], ["updated_at", "2019-07-04 04:50:05.368762"], ["created_at", "2019-07-04 04:50:05.368762"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? [["resource_type", "Project"], ["resource_id", 1]] +  (0.6ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_notify +----------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:50:05.373876"], ["updated_at", "2019-07-04 04:50:05.373876"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.375002') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.376272') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:50:05.377642') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_bang +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (1.1ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:37.494398"], ["updated_at", "2019-07-04 04:52:37.494398"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.7ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.508599') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.547207') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (1.0ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "5k1Y5XcW3T86J4ueeRhd"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:37.537971"], ["updated_at", "2019-07-04 04:52:37.548285"], ["created_at", "2019-07-04 04:52:37.548285"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.550826') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.3ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:52:37.557057"], ["reminded_at", "2019-07-04 04:52:37.557057"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_proposer_instance +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:37.560989"], ["updated_at", "2019-07-04 04:52:37.560989"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.562220') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.563771') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "proposer_type", "proposer_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "wmq5zMn1kaBXaB56kQAt"], ["email", "user@example.com"], ["proposable_type", "User"], ["proposer_type", "User"], ["proposer_id", 1], ["expires_at", "2019-07-05 04:52:37.563042"], ["updated_at", "2019-07-04 04:52:37.564491"], ["created_at", "2019-07-04 04:52:37.564491"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposer_type" = ? AND "proposal_tokens"."proposer_id" = ? [["proposer_type", "User"], ["proposer_id", 1]] +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------- +ProposalTest: test_should_accept_a_resource +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.9ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:52:37.574121"], ["updated_at", "2019-07-04 04:52:37.574121"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.576152') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.578000') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "b57pzy4mbf5rNj8EYbes"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:52:37.577103"], ["updated_at", "2019-07-04 04:52:37.578817"], ["created_at", "2019-07-04 04:52:37.578817"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.1ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:52:37.580111"], ["updated_at", "2019-07-04 04:52:37.580111"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.580795') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.582688') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "XpQjahpWumfL2AjFeyMS"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["expires_at", "2019-07-05 04:52:37.581697"], ["updated_at", "2019-07-04 04:52:37.583924"], ["created_at", "2019-07-04 04:52:37.583924"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.585386') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_expired +---------------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.588129') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.589800') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "wewoi7rMfC1qzMCyJw1C"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:37.589102"], ["updated_at", "2019-07-04 04:52:37.590542"], ["created_at", "2019-07-04 04:52:37.590542"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_respond_to_the_recipient +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:37.593613"], ["updated_at", "2019-07-04 04:52:37.593613"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.594781') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------- +ProposalTest: test_user_should_have_proposal +-------------------------------------------- + Proposal::Token Load (0.6ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.597608') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------- +ProposalTest: test_should_create_a_new_token_if_accepted_token_exists +--------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (1.1ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:52:37.602088"], ["updated_at", "2019-07-04 04:52:37.602088"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:37.606015"], ["updated_at", "2019-07-04 04:52:37.606015"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.607196') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.609543') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "EDdPm1yGc4goftFTvE3c"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:52:37.608569"], ["updated_at", "2019-07-04 04:52:37.610683"], ["created_at", "2019-07-04 04:52:37.610683"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:52:37.612095"], ["accepted_at", "2019-07-04 04:52:37.612095"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.613014') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.616200') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "98brfnVJ1oteySyQyZwW"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:52:37.614159"], ["updated_at", "2019-07-04 04:52:37.618234"], ["created_at", "2019-07-04 04:52:37.618234"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.9ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_token_from_to_s_method +------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.621926') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.623818') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "MRpijdGmGNU14qLXFy3v"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:37.622946"], ["updated_at", "2019-07-04 04:52:37.624577"], ["created_at", "2019-07-04 04:52:37.624577"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------ +ProposalTest: test_should_return_hash_when_arguments_is_hash +------------------------------------------------------------ + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.627048') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.628884') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "WvS6yYYrYdUtDkBBKbZJ"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n:role: admin\n"], ["expires_at", "2019-07-05 04:52:37.627958"], ["updated_at", "2019-07-04 04:52:37.629769"], ["created_at", "2019-07-04 04:52:37.629769"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.6ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "WvS6yYYrYdUtDkBBKbZJ"], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_return_proposal_instance +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:37.637141"], ["updated_at", "2019-07-04 04:52:37.637141"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.638481') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.640765') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------- +ProposalTest: test_should_have_action_remind_for_notify_(existing_user) +----------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.5ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:37.643356"], ["updated_at", "2019-07-04 04:52:37.643356"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.644824') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.646903') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "Tm7eas4tshzsKhPwq6kt"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:37.645963"], ["updated_at", "2019-07-04 04:52:37.648655"], ["created_at", "2019-07-04 04:52:37.648655"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.650796') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_find_and_accept_proposal +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:37.655389"], ["updated_at", "2019-07-04 04:52:37.655389"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.656612') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.658310') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "fMq5HkqMnq91182MtBbr"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:37.657571"], ["updated_at", "2019-07-04 04:52:37.659168"], ["created_at", "2019-07-04 04:52:37.659168"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "fMq5HkqMnq91182MtBbr"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:52:37.661059"], ["accepted_at", "2019-07-04 04:52:37.661059"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_a_proc +-------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.663093') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.665467') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------- +ProposalTest: test_should_return_the_resource +--------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.5ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:52:37.668295"], ["updated_at", "2019-07-04 04:52:37.668295"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.669787') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------ +ProposalTest: test_should_not_return_proposal_instance +------------------------------------------------------ + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.672278') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_safe +------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:37.675383"], ["updated_at", "2019-07-04 04:52:37.675383"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.676509') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.678013') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "ubUyCpYXsKFSysLNt7ec"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:37.677330"], ["updated_at", "2019-07-04 04:52:37.678695"], ["created_at", "2019-07-04 04:52:37.678695"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.680167') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:52:37.682915"], ["reminded_at", "2019-07-04 04:52:37.682915"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +------------------------ +ProposalTest: test_truth +------------------------ +  (0.1ms) rollback transaction +  (0.2ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_not_create_a_new_token_if_token_exists +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.687432') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.7ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "yynbpeLhduFQK2wtyEki"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2020-07-04 04:52:37.687089"], ["updated_at", "2019-07-04 04:52:37.698392"], ["created_at", "2019-07-04 04:52:37.698392"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.701410') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------------ +ProposalTest: test_should_have_action_remind_for_invite_(new_user) +------------------------------------------------------------------ + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.704131') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.705832') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "knRksNSsaqo9d63DxQZy"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:37.705132"], ["updated_at", "2019-07-04 04:52:37.706492"], ["created_at", "2019-07-04 04:52:37.706492"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.707795') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_all_proposals_for_type +------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.713721') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.715851') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "2yAP8rZSf4V8xLbaNrxj"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:37.714633"], ["updated_at", "2019-07-04 04:52:37.716945"], ["created_at", "2019-07-04 04:52:37.716945"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? [["proposable_type", "User"]] +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------- +ProposalTest: test_should_not_return_no_action_if_accepted +---------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.720618') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.722274') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "XFAyZNykWhqockJapiuF"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:37.721567"], ["updated_at", "2019-07-04 04:52:37.722915"], ["created_at", "2019-07-04 04:52:37.722915"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:52:37.724659"], ["accepted_at", "2019-07-04 04:52:37.724659"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_accepted_safe +---------------------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.726725') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.728136') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol_and_args +----------------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.732044') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.735207') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_accepted +----------------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.737517') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.739251') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "EopsEpCtPvtFNWaQAJwy"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:37.738457"], ["updated_at", "2019-07-04 04:52:37.740132"], ["created_at", "2019-07-04 04:52:37.740132"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:52:37.741713"], ["accepted_at", "2019-07-04 04:52:37.741713"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol +-------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.743521') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.744900') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_resource_instance +---------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:37.746483"], ["updated_at", "2019-07-04 04:52:37.746483"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.2ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:52:37.747888"], ["updated_at", "2019-07-04 04:52:37.747888"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.749143') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.752737') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.7ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "iZD4yHKj9CZJz5USTkmf"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:52:37.750650"], ["updated_at", "2019-07-04 04:52:37.754210"], ["created_at", "2019-07-04 04:52:37.754210"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? [["resource_type", "Project"], ["resource_id", 1]] +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbols +--------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.758461') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.759921') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_notify +----------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.3ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:37.761650"], ["updated_at", "2019-07-04 04:52:37.761650"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.762711') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.763939') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.765732') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------- +ProposalTest: test_should_respond_to_the_resource +------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:37.768647"], ["updated_at", "2019-07-04 04:52:37.768647"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.1ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:52:37.770012"], ["updated_at", "2019-07-04 04:52:37.770012"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.770776') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_invite +----------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.772946') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.774283') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.775640') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------- +ProposalTest: test_should_create_valid_proposal_token +----------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.777351') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.778861') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "HzhFyYyqKJtHyyjoZYP5"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:37.778203"], ["updated_at", "2019-07-04 04:52:37.779513"], ["created_at", "2019-07-04 04:52:37.779513"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.5ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------- +ProposalTest: test_should_return_all_arguments +---------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.784089') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.786297') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "fcMzwaKf8EkDvhQmxQrj"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n- admin\n- 1\n"], ["expires_at", "2019-07-05 04:52:37.785303"], ["updated_at", "2019-07-04 04:52:37.787166"], ["created_at", "2019-07-04 04:52:37.787166"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "fcMzwaKf8EkDvhQmxQrj"], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_raise_error_if_remind_is_not_true +----------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.791469') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:37.793686') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) begin transaction +--------------------------------------------------------------------- +ProposalTest: test_should_create_a_new_token_if_accepted_token_exists +--------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.5ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:52:57.355422"], ["updated_at", "2019-07-04 04:52:57.355422"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:57.362398"], ["updated_at", "2019-07-04 04:52:57.362398"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.372110') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.392923') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "unwLskxZh9r6xA5pANaW"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:52:57.387315"], ["updated_at", "2019-07-04 04:52:57.393883"], ["created_at", "2019-07-04 04:52:57.393883"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:52:57.395544"], ["accepted_at", "2019-07-04 04:52:57.395544"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.396541') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.398399') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "QHFDTUuDLcYwxuJgf7Pp"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:52:57.397476"], ["updated_at", "2019-07-04 04:52:57.406065"], ["created_at", "2019-07-04 04:52:57.406065"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.9ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------- +ProposalTest: test_should_not_return_no_action_if_accepted +---------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.409950') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.411903') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.7ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "KYpeKLBkNg4zL7YuUsFR"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:57.411053"], ["updated_at", "2019-07-04 04:52:57.412938"], ["created_at", "2019-07-04 04:52:57.412938"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:52:57.415192"], ["accepted_at", "2019-07-04 04:52:57.415192"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_accepted_safe +---------------------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.417474') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.419099') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_safe +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:57.423700"], ["updated_at", "2019-07-04 04:52:57.423700"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.424991') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.426425') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "F2jyP1GneKepgum6oHuP"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:57.425775"], ["updated_at", "2019-07-04 04:52:57.427042"], ["created_at", "2019-07-04 04:52:57.427042"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.428600') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:52:57.434309"], ["reminded_at", "2019-07-04 04:52:57.434309"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_all_proposals_for_type +------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.436916') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.439154') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "Qspr7Pp9ddEVeYxuPMvs"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:57.438172"], ["updated_at", "2019-07-04 04:52:57.440423"], ["created_at", "2019-07-04 04:52:57.440423"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? [["proposable_type", "User"]] +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_a_proc +-------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.444524') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.4ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.447071') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_invite +----------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.450402') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.452317') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.455605') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_bang +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:57.459575"], ["updated_at", "2019-07-04 04:52:57.459575"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.461110') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.463432') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "dZJGXuvcEe31apozra5k"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:57.462177"], ["updated_at", "2019-07-04 04:52:57.464670"], ["created_at", "2019-07-04 04:52:57.464670"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.466184') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:52:57.468534"], ["reminded_at", "2019-07-04 04:52:57.468534"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------------ +ProposalTest: test_should_have_action_remind_for_invite_(new_user) +------------------------------------------------------------------ + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.471131') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.472954') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "kRKKA9PvUVyfwpphqpwT"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:57.472196"], ["updated_at", "2019-07-04 04:52:57.473639"], ["created_at", "2019-07-04 04:52:57.473639"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.474797') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +------------------------ +ProposalTest: test_truth +------------------------ +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------- +ProposalTest: test_should_respond_to_the_resource +------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.6ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:57.484116"], ["updated_at", "2019-07-04 04:52:57.484116"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.2ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:52:57.486815"], ["updated_at", "2019-07-04 04:52:57.486815"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.488404') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_respond_to_the_recipient +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:57.492935"], ["updated_at", "2019-07-04 04:52:57.492935"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.8ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.494498') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (1.0ms) rollback transaction +  (0.3ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_token_from_to_s_method +------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.501990') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.505479') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "X64WLAqARqU9xGzKsuwv"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:57.504165"], ["updated_at", "2019-07-04 04:52:57.506798"], ["created_at", "2019-07-04 04:52:57.506798"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------ +ProposalTest: test_should_return_hash_when_arguments_is_hash +------------------------------------------------------------ + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.509852') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.512979') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "fgVq5yE8RGadY8Azwyv2"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n:role: admin\n"], ["expires_at", "2019-07-05 04:52:57.511558"], ["updated_at", "2019-07-04 04:52:57.514052"], ["created_at", "2019-07-04 04:52:57.514052"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "fgVq5yE8RGadY8Azwyv2"], ["LIMIT", 1]] +  (0.9ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol_and_args +----------------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.520489') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.522730') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_not_create_a_new_token_if_token_exists +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.525503') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (1.0ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "czZfV5MQsnUKqsmFX7Ue"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2020-07-04 04:52:57.525082"], ["updated_at", "2019-07-04 04:52:57.526952"], ["created_at", "2019-07-04 04:52:57.526952"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.530463') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_raise_error_if_remind_is_not_true +----------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.532719') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.534548') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------- +ProposalTest: test_should_return_the_resource +--------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.4ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:52:57.536867"], ["updated_at", "2019-07-04 04:52:57.536867"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.538270') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_return_proposal_instance +-------------------------------------------------- +  (11.4ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:57.552925"], ["updated_at", "2019-07-04 04:52:57.552925"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.554276') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.556238') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol +-------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.558022') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.559504') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbols +--------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.561093') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.563387') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------- +ProposalTest: test_should_have_action_remind_for_notify_(existing_user) +----------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.6ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:57.565609"], ["updated_at", "2019-07-04 04:52:57.565609"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.567056') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.568616') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "gdNw6fvWSbF8MqRXHtQu"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:57.567925"], ["updated_at", "2019-07-04 04:52:57.569267"], ["created_at", "2019-07-04 04:52:57.569267"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.570598') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------- +ProposalTest: test_should_accept_a_resource +------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.4ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:52:57.573632"], ["updated_at", "2019-07-04 04:52:57.573632"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.574733') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.576352') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.7ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "Qoq9N1z5z796NbxhEtZC"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:52:57.575653"], ["updated_at", "2019-07-04 04:52:57.577046"], ["created_at", "2019-07-04 04:52:57.577046"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.1ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:52:57.579880"], ["updated_at", "2019-07-04 04:52:57.579880"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.580881') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.582600') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] + Proposal::Token Create (0.1ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "mLF2f35yz3nyQC31PH7n"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["expires_at", "2019-07-05 04:52:57.581840"], ["updated_at", "2019-07-04 04:52:57.583725"], ["created_at", "2019-07-04 04:52:57.583725"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.584750') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------- +ProposalTest: test_user_should_have_proposal +-------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.587179') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------- +ProposalTest: test_should_return_all_arguments +---------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.588935') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.590444') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "5ypEy9a7MAsBgheuDMa1"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n- admin\n- 1\n"], ["expires_at", "2019-07-05 04:52:57.589754"], ["updated_at", "2019-07-04 04:52:57.591096"], ["created_at", "2019-07-04 04:52:57.591096"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "5ypEy9a7MAsBgheuDMa1"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_expired +---------------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.594824') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.597506') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "Y3tdGVk8bgq7Utq1UkCo"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:57.596199"], ["updated_at", "2019-07-04 04:52:57.598350"], ["created_at", "2019-07-04 04:52:57.598350"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_proposer_instance +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.5ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:57.601844"], ["updated_at", "2019-07-04 04:52:57.601844"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.603223') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.604828') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "proposer_type", "proposer_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "4xp9quGoRV6bTgiiBg3V"], ["email", "user@example.com"], ["proposable_type", "User"], ["proposer_type", "User"], ["proposer_id", 1], ["expires_at", "2019-07-05 04:52:57.604086"], ["updated_at", "2019-07-04 04:52:57.605562"], ["created_at", "2019-07-04 04:52:57.605562"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposer_type" = ? AND "proposal_tokens"."proposer_id" = ? [["proposer_type", "User"], ["proposer_id", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------ +ProposalTest: test_should_not_return_proposal_instance +------------------------------------------------------ + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.608147') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_notify +----------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:57.611834"], ["updated_at", "2019-07-04 04:52:57.611834"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.613581') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.615009') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.616536') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------- +ProposalTest: test_should_create_valid_proposal_token +----------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.618775') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.620608') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "vBFNx9X1Nqxd7fTZeQdn"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:57.619734"], ["updated_at", "2019-07-04 04:52:57.621350"], ["created_at", "2019-07-04 04:52:57.621350"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_accepted +----------------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.624148') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.625790') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "zXS7qGXaTnLX9xwGMxqt"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:57.625105"], ["updated_at", "2019-07-04 04:52:57.626432"], ["created_at", "2019-07-04 04:52:57.626432"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.2ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:52:57.627858"], ["accepted_at", "2019-07-04 04:52:57.627858"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_find_and_accept_proposal +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:57.631059"], ["updated_at", "2019-07-04 04:52:57.631059"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.632321') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.634370') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "XKsxKZKE7qpHLurjxAFV"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:52:57.633514"], ["updated_at", "2019-07-04 04:52:57.635315"], ["created_at", "2019-07-04 04:52:57.635315"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "XKsxKZKE7qpHLurjxAFV"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:52:57.637385"], ["accepted_at", "2019-07-04 04:52:57.637385"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_resource_instance +---------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + User Create (0.3ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:52:57.639548"], ["updated_at", "2019-07-04 04:52:57.639548"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.1ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:52:57.640818"], ["updated_at", "2019-07-04 04:52:57.640818"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.641576') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:52:57.643174') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "zFAj2ZhndtEszNaXuyNJ"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:52:57.642482"], ["updated_at", "2019-07-04 04:52:57.643917"], ["created_at", "2019-07-04 04:52:57.643917"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? [["resource_type", "Project"], ["resource_id", 1]] +  (0.6ms) rollback transaction +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) begin transaction +------------------------------------------------------------------ +ProposalTest: test_should_have_action_remind_for_invite_(new_user) +------------------------------------------------------------------ + Proposal::Token Load (0.6ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.348761') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.414408') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (1.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "5j9aqxptxhy8MtupDisS"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:10.380347"], ["updated_at", "2019-07-04 04:53:10.415643"], ["created_at", "2019-07-04 04:53:10.415643"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.418713') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.7ms) rollback transaction +  (0.2ms) begin transaction +---------------------------------------------------------- +ProposalTest: test_should_not_return_no_action_if_accepted +---------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.430132') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.432996') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.6ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "f9261RHC4Aw29Wz7n5re"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:10.431886"], ["updated_at", "2019-07-04 04:53:10.434245"], ["created_at", "2019-07-04 04:53:10.434245"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.2ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:53:10.436894"], ["accepted_at", "2019-07-04 04:53:10.436894"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_all_proposals_for_type +------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.441294') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.443582') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "AzhhfLRYqy7ksNpcqTUx"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:10.442739"], ["updated_at", "2019-07-04 04:53:10.444372"], ["created_at", "2019-07-04 04:53:10.444372"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? [["proposable_type", "User"]] +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------- +ProposalTest: test_should_create_a_new_token_if_accepted_token_exists +--------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Project Create (0.9ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:53:10.452989"], ["updated_at", "2019-07-04 04:53:10.452989"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.3ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:10.461894"], ["updated_at", "2019-07-04 04:53:10.461894"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.463652') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.466398') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "SwnJYWzpLeVaWPxo9GCg"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:53:10.465441"], ["updated_at", "2019-07-04 04:53:10.467261"], ["created_at", "2019-07-04 04:53:10.467261"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:53:10.468633"], ["accepted_at", "2019-07-04 04:53:10.468633"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.469423') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.471033') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "nnJPTNuCxz1qK2xn8bqY"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:53:10.470250"], ["updated_at", "2019-07-04 04:53:10.471901"], ["created_at", "2019-07-04 04:53:10.471901"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_bang +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:10.475586"], ["updated_at", "2019-07-04 04:53:10.475586"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.476742') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.478773') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "tLHLnwazdGZWxUkzj6Tz"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:10.477760"], ["updated_at", "2019-07-04 04:53:10.479856"], ["created_at", "2019-07-04 04:53:10.479856"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.481457') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:53:10.483375"], ["reminded_at", "2019-07-04 04:53:10.483375"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_accepted_safe +---------------------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.485674') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.487655') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_respond_to_the_recipient +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.7ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:10.495005"], ["updated_at", "2019-07-04 04:53:10.495005"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.497030') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +------------------------ +ProposalTest: test_truth +------------------------ +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------- +ProposalTest: test_should_respond_to_the_resource +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:10.500881"], ["updated_at", "2019-07-04 04:53:10.500881"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.1ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:53:10.502294"], ["updated_at", "2019-07-04 04:53:10.502294"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.503208') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------- +ProposalTest: test_should_accept_a_resource +------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Project Create (0.7ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:53:10.506833"], ["updated_at", "2019-07-04 04:53:10.506833"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.510187') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.512758') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "sJR77xPpab2JoFSRuXag"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:53:10.511955"], ["updated_at", "2019-07-04 04:53:10.513845"], ["created_at", "2019-07-04 04:53:10.513845"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.1ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:53:10.515240"], ["updated_at", "2019-07-04 04:53:10.515240"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.515989') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.517518') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] + Proposal::Token Create (0.1ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "oJpig6srUB1XzDFw3q4t"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["expires_at", "2019-07-05 04:53:10.516817"], ["updated_at", "2019-07-04 04:53:10.518242"], ["created_at", "2019-07-04 04:53:10.518242"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.519532') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------- +ProposalTest: test_should_create_valid_proposal_token +----------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.521862') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.523624') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "J2edNzxWzjzpJibB1fwb"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:10.522922"], ["updated_at", "2019-07-04 04:53:10.524502"], ["created_at", "2019-07-04 04:53:10.524502"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_token_from_to_s_method +------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.527096') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.528821') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "7v9i63kRb6jsgQ6uvBE1"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:10.528082"], ["updated_at", "2019-07-04 04:53:10.529518"], ["created_at", "2019-07-04 04:53:10.529518"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------ +ProposalTest: test_should_not_return_proposal_instance +------------------------------------------------------ + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.532636') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_find_and_accept_proposal +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.5ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:10.536475"], ["updated_at", "2019-07-04 04:53:10.536475"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.6ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.538188') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.3ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.543027') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "N3HZdqAp71DzSQJzyuPq"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:10.541275"], ["updated_at", "2019-07-04 04:53:10.544853"], ["created_at", "2019-07-04 04:53:10.544853"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "N3HZdqAp71DzSQJzyuPq"], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:53:10.548726"], ["accepted_at", "2019-07-04 04:53:10.548726"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------ +ProposalTest: test_should_return_hash_when_arguments_is_hash +------------------------------------------------------------ + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.551339') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.553328') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (1.1ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "YuVoyxws8wDKBzSyppUo"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n:role: admin\n"], ["expires_at", "2019-07-05 04:53:10.552538"], ["updated_at", "2019-07-04 04:53:10.554125"], ["created_at", "2019-07-04 04:53:10.554125"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "YuVoyxws8wDKBzSyppUo"], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_accepted +----------------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.560857') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.563629') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "httfbfU3E4XqARGcJHoP"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:10.562573"], ["updated_at", "2019-07-04 04:53:10.564390"], ["created_at", "2019-07-04 04:53:10.564390"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:53:10.565836"], ["accepted_at", "2019-07-04 04:53:10.565836"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_not_create_a_new_token_if_token_exists +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.568741') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "VU4m9eZVZfX3uzCu6n3p"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2020-07-04 04:53:10.568426"], ["updated_at", "2019-07-04 04:53:10.569529"], ["created_at", "2019-07-04 04:53:10.569529"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.572116') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_proposer_instance +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.6ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:10.575298"], ["updated_at", "2019-07-04 04:53:10.575298"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.577233') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.579434') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "proposer_type", "proposer_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "NPzJxeg3jzRtUhVM9nQq"], ["email", "user@example.com"], ["proposable_type", "User"], ["proposer_type", "User"], ["proposer_id", 1], ["expires_at", "2019-07-05 04:53:10.578400"], ["updated_at", "2019-07-04 04:53:10.580257"], ["created_at", "2019-07-04 04:53:10.580257"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposer_type" = ? AND "proposal_tokens"."proposer_id" = ? [["proposer_type", "User"], ["proposer_id", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_a_proc +-------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.582925') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.584344') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------- +ProposalTest: test_should_return_the_resource +--------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.4ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:53:10.585897"], ["updated_at", "2019-07-04 04:53:10.585897"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.586969') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_return_proposal_instance +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:10.591034"], ["updated_at", "2019-07-04 04:53:10.591034"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.592264') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.594792') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbols +--------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.596677') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.598129') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol +-------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.599475') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.601185') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_notify +----------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.3ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:10.602936"], ["updated_at", "2019-07-04 04:53:10.602936"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.604108') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.605754') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.607898') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol_and_args +----------------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.609814') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.611952') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_safe +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.5ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:10.613758"], ["updated_at", "2019-07-04 04:53:10.613758"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.615138') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.616708') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "tEpbgE5xp2kuzLedYThi"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:10.616012"], ["updated_at", "2019-07-04 04:53:10.617375"], ["created_at", "2019-07-04 04:53:10.617375"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.618361') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:53:10.620016"], ["reminded_at", "2019-07-04 04:53:10.620016"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_raise_error_if_remind_is_not_true +----------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.623481') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.625620') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------- +ProposalTest: test_user_should_have_proposal +-------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.628444') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_resource_instance +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:10.640089"], ["updated_at", "2019-07-04 04:53:10.640089"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.1ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:53:10.641838"], ["updated_at", "2019-07-04 04:53:10.641838"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.642782') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.644925') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "K6P9epNpswUfpWbpXBop"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:53:10.644116"], ["updated_at", "2019-07-04 04:53:10.645710"], ["created_at", "2019-07-04 04:53:10.645710"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? [["resource_type", "Project"], ["resource_id", 1]] +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------- +ProposalTest: test_should_return_all_arguments +---------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.649071') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.650778') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.6ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "nv1irsFzzVL7cWrDHps3"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n- admin\n- 1\n"], ["expires_at", "2019-07-05 04:53:10.650059"], ["updated_at", "2019-07-04 04:53:10.651402"], ["created_at", "2019-07-04 04:53:10.651402"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "nv1irsFzzVL7cWrDHps3"], ["LIMIT", 1]] +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------------- +ProposalTest: test_should_have_action_remind_for_notify_(existing_user) +----------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.5ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:10.656986"], ["updated_at", "2019-07-04 04:53:10.656986"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.658698') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.660923') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "yMaKKDNypwzaD7tczxgH"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:10.659929"], ["updated_at", "2019-07-04 04:53:10.661722"], ["created_at", "2019-07-04 04:53:10.661722"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.662978') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_invite +----------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.667031') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.668501') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.669903') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_expired +---------------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.672481') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:10.675165') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.6ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "q6bTjm3qVNwxp2gyn9Gx"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:10.674346"], ["updated_at", "2019-07-04 04:53:10.675906"], ["created_at", "2019-07-04 04:53:10.675906"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (1.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.0ms) commit transaction +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) begin transaction +----------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_accepted +----------------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.611475') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.650012') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "q3nbfQTi3y2HYyp6AYx8"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:33.640793"], ["updated_at", "2019-07-04 04:53:33.650979"], ["created_at", "2019-07-04 04:53:33.650979"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:53:33.652639"], ["accepted_at", "2019-07-04 04:53:33.652639"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (1.9ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_resource_instance +---------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + User Create (0.3ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:33.660937"], ["updated_at", "2019-07-04 04:53:33.660937"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.2ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:53:33.666381"], ["updated_at", "2019-07-04 04:53:33.666381"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.667410') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.669033') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "VaRR8MqidtovF8HCyyJv"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:53:33.668310"], ["updated_at", "2019-07-04 04:53:33.669746"], ["created_at", "2019-07-04 04:53:33.669746"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? [["resource_type", "Project"], ["resource_id", 1]] +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------- +ProposalTest: test_should_return_all_arguments +---------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.674756') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.676741') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "2mX97JaeWatczpLHr4Ea"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n- admin\n- 1\n"], ["expires_at", "2019-07-05 04:53:33.675943"], ["updated_at", "2019-07-04 04:53:33.677475"], ["created_at", "2019-07-04 04:53:33.677475"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "2mX97JaeWatczpLHr4Ea"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------- +ProposalTest: test_should_return_the_resource +--------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.3ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:53:33.681853"], ["updated_at", "2019-07-04 04:53:33.681853"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.682974') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_proposer_instance +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:33.686385"], ["updated_at", "2019-07-04 04:53:33.686385"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.687609') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.689664') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "proposer_type", "proposer_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "rxfAg8WM6T12Zj2bsz74"], ["email", "user@example.com"], ["proposable_type", "User"], ["proposer_type", "User"], ["proposer_id", 1], ["expires_at", "2019-07-05 04:53:33.688489"], ["updated_at", "2019-07-04 04:53:33.692032"], ["created_at", "2019-07-04 04:53:33.692032"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposer_type" = ? AND "proposal_tokens"."proposer_id" = ? [["proposer_type", "User"], ["proposer_id", 1]] +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_notify +----------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:33.696247"], ["updated_at", "2019-07-04 04:53:33.696247"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.697402') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.698676') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.700603') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_return_proposal_instance +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:33.702998"], ["updated_at", "2019-07-04 04:53:33.702998"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.704204') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.708575') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol +-------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.710508') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.711946') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_bang +------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:33.713569"], ["updated_at", "2019-07-04 04:53:33.713569"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.714646') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.716087') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "b3MFFxqjXbtsVtfMKxB9"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:33.715427"], ["updated_at", "2019-07-04 04:53:33.717094"], ["created_at", "2019-07-04 04:53:33.717094"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.718296') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.2ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:53:33.720502"], ["reminded_at", "2019-07-04 04:53:33.720502"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol_and_args +----------------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.723883') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.726129') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_invite +----------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.727917') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.729288') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.730547') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------- +ProposalTest: test_should_accept_a_resource +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.7ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:53:33.732425"], ["updated_at", "2019-07-04 04:53:33.732425"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.734605') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.736574') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "X4pnJ8bEFiNaPc3TXUxt"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:53:33.735779"], ["updated_at", "2019-07-04 04:53:33.737839"], ["created_at", "2019-07-04 04:53:33.737839"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.1ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:53:33.739848"], ["updated_at", "2019-07-04 04:53:33.739848"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.740884') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.742616') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] + Proposal::Token Create (0.1ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "AdwUc8hoQX6gFRDvC8yx"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["expires_at", "2019-07-05 04:53:33.741754"], ["updated_at", "2019-07-04 04:53:33.743966"], ["created_at", "2019-07-04 04:53:33.743966"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.745361') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------- +ProposalTest: test_should_create_valid_proposal_token +----------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.748131') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.749929') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "2sVgvb3swrWrPK62jppi"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:33.749103"], ["updated_at", "2019-07-04 04:53:33.750961"], ["created_at", "2019-07-04 04:53:33.750961"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_find_and_accept_proposal +-------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:33.753904"], ["updated_at", "2019-07-04 04:53:33.753904"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.755774') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.758189') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "uPh9xQNVQRtyzjqBEeso"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:33.757037"], ["updated_at", "2019-07-04 04:53:33.759173"], ["created_at", "2019-07-04 04:53:33.759173"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "uPh9xQNVQRtyzjqBEeso"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.2ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:53:33.761294"], ["accepted_at", "2019-07-04 04:53:33.761294"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_raise_error_if_remind_is_not_true +----------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.763270') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.764835') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------ +ProposalTest: test_should_return_hash_when_arguments_is_hash +------------------------------------------------------------ + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.766854') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.768929') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.7ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "PH5NRpVXWUSxcRxFJz4W"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n:role: admin\n"], ["expires_at", "2019-07-05 04:53:33.768166"], ["updated_at", "2019-07-04 04:53:33.769690"], ["created_at", "2019-07-04 04:53:33.769690"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "PH5NRpVXWUSxcRxFJz4W"], ["LIMIT", 1]] +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_a_proc +-------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.775155') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.776655') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------- +ProposalTest: test_should_have_action_remind_for_notify_(existing_user) +----------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:33.778383"], ["updated_at", "2019-07-04 04:53:33.778383"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.780096') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.781754') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "RDp7fkN5AMRNs6xzzEhW"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:33.780930"], ["updated_at", "2019-07-04 04:53:33.782544"], ["created_at", "2019-07-04 04:53:33.782544"]] +  (10.9ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.794575') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbols +--------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.797982') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.799457') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------- +ProposalTest: test_user_should_have_proposal +-------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.801241') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------ +ProposalTest: test_should_not_return_proposal_instance +------------------------------------------------------ + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.803389') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_token_from_to_s_method +------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.807799') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.809719') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "jD8vUALcVG4Nhew8a3WD"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:33.808996"], ["updated_at", "2019-07-04 04:53:33.810403"], ["created_at", "2019-07-04 04:53:33.810403"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------- +ProposalTest: test_should_not_return_no_action_if_accepted +---------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.812558') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.814143') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "JaWbTUzsHTggyoWLqztH"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:33.813476"], ["updated_at", "2019-07-04 04:53:33.815006"], ["created_at", "2019-07-04 04:53:33.815006"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:53:33.816390"], ["accepted_at", "2019-07-04 04:53:33.816390"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------- +ProposalTest: test_should_respond_to_the_resource +------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:33.819243"], ["updated_at", "2019-07-04 04:53:33.819243"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.2ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:53:33.820669"], ["updated_at", "2019-07-04 04:53:33.820669"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.822689') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.7ms) rollback transaction +  (0.0ms) begin transaction +------------------------ +ProposalTest: test_truth +------------------------ +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_accepted_safe +---------------------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.826312') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.827747') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_all_proposals_for_type +------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.831424') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.833415') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "PLAFE63ku3Ln3R6EbohR"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:33.832405"], ["updated_at", "2019-07-04 04:53:33.834557"], ["created_at", "2019-07-04 04:53:33.834557"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? [["proposable_type", "User"]] +  (0.4ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_safe +------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + User Create (1.7ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:33.839986"], ["updated_at", "2019-07-04 04:53:33.839986"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.843905') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.845711') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "qNxLQrqyqR5HKTzpcyGc"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:33.844988"], ["updated_at", "2019-07-04 04:53:33.846473"], ["created_at", "2019-07-04 04:53:33.846473"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.847549') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.2ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:53:33.849993"], ["reminded_at", "2019-07-04 04:53:33.849993"], ["id", 1]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------------ +ProposalTest: test_should_have_action_remind_for_invite_(new_user) +------------------------------------------------------------------ + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.853886') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.856411') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "5GUnzHwsYKqKLZiygnyZ"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:33.855337"], ["updated_at", "2019-07-04 04:53:33.857263"], ["created_at", "2019-07-04 04:53:33.857263"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.858467') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------------------- +ProposalTest: test_should_create_a_new_token_if_accepted_token_exists +--------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.4ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:53:33.864589"], ["updated_at", "2019-07-04 04:53:33.864589"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:33.866244"], ["updated_at", "2019-07-04 04:53:33.866244"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.868711') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.871070') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "Y98sz6b38c1X8K8hYwX6"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:53:33.870060"], ["updated_at", "2019-07-04 04:53:33.872195"], ["created_at", "2019-07-04 04:53:33.872195"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.2ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:53:33.873716"], ["accepted_at", "2019-07-04 04:53:33.873716"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.875169') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.877032') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.1ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "qmxhNN25dwFarJKaGysy"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:53:33.876237"], ["updated_at", "2019-07-04 04:53:33.877893"], ["created_at", "2019-07-04 04:53:33.877893"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_expired +---------------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.880792') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.882785') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.7ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "5pqFosqcDgw47nUT3Di3"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:53:33.881905"], ["updated_at", "2019-07-04 04:53:33.884912"], ["created_at", "2019-07-04 04:53:33.884912"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_not_create_a_new_token_if_token_exists +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.4ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.890558') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "zQ5BzQNHDpHyz9EFAkXE"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2020-07-04 04:53:33.890131"], ["updated_at", "2019-07-04 04:53:33.892173"], ["created_at", "2019-07-04 04:53:33.892173"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.894222') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_respond_to_the_recipient +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:53:33.896929"], ["updated_at", "2019-07-04 04:53:33.896929"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:53:33.898284') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.7ms) rollback transaction +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] +  (0.0ms) begin transaction +  (0.0ms) commit transaction +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) begin transaction +-------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol +-------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.148153') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.187748') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------- +ProposalTest: test_user_should_have_proposal +-------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.190574') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_return_proposal_instance +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.6ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:54:02.198227"], ["updated_at", "2019-07-04 04:54:02.198227"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.200136') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.203340') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_accepted +----------------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.205791') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.207897') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "B44jpH2jLP6dzYqaCEqQ"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:54:02.207003"], ["updated_at", "2019-07-04 04:54:02.209312"], ["created_at", "2019-07-04 04:54:02.209312"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:54:02.211400"], ["accepted_at", "2019-07-04 04:54:02.211400"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------- +ProposalTest: test_should_not_return_no_action_if_accepted +---------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.213686') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.215321') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.6ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "shPqw3cPHKzjuDTYbhGZ"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:54:02.214606"], ["updated_at", "2019-07-04 04:54:02.215977"], ["created_at", "2019-07-04 04:54:02.215977"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:54:02.217755"], ["accepted_at", "2019-07-04 04:54:02.217755"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_safe +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:54:02.220499"], ["updated_at", "2019-07-04 04:54:02.220499"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.221917') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.225330') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "KF8CzShGNLVus3zESmxm"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:54:02.223535"], ["updated_at", "2019-07-04 04:54:02.226194"], ["created_at", "2019-07-04 04:54:02.226194"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.227475') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:54:02.229197"], ["reminded_at", "2019-07-04 04:54:02.229197"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_all_proposals_for_type +------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.231218') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.233024') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "twTypEGBPfKDsx655yxP"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:54:02.232309"], ["updated_at", "2019-07-04 04:54:02.234133"], ["created_at", "2019-07-04 04:54:02.234133"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? [["proposable_type", "User"]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_invite +----------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.237328') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.5ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.239697') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.242260') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------- +ProposalTest: test_should_respond_to_the_resource +------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:54:02.245286"], ["updated_at", "2019-07-04 04:54:02.245286"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.2ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:54:02.252106"], ["updated_at", "2019-07-04 04:54:02.252106"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.253214') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------------ +ProposalTest: test_should_have_action_remind_for_invite_(new_user) +------------------------------------------------------------------ + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.256551') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.258687') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "j9MTeYUKv42QZ4wHQiWy"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:54:02.257835"], ["updated_at", "2019-07-04 04:54:02.259403"], ["created_at", "2019-07-04 04:54:02.259403"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.260664') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.6ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_proposer_instance +---------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + User Create (0.6ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:54:02.266616"], ["updated_at", "2019-07-04 04:54:02.266616"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.268160') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.269835') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "proposer_type", "proposer_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "KrdWaaizqcKAVh7eabAe"], ["email", "user@example.com"], ["proposable_type", "User"], ["proposer_type", "User"], ["proposer_id", 1], ["expires_at", "2019-07-05 04:54:02.269061"], ["updated_at", "2019-07-04 04:54:02.270548"], ["created_at", "2019-07-04 04:54:02.270548"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposer_type" = ? AND "proposal_tokens"."proposer_id" = ? [["proposer_type", "User"], ["proposer_id", 1]] +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------- +ProposalTest: test_should_create_valid_proposal_token +----------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.275379') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.277481') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "zpddiSThq9Hc45csSbnB"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:54:02.276618"], ["updated_at", "2019-07-04 04:54:02.278403"], ["created_at", "2019-07-04 04:54:02.278403"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_a_proc +-------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.281297') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.283370') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_notify +----------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:54:02.285938"], ["updated_at", "2019-07-04 04:54:02.285938"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.287479') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.289856') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.291909') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_resource_instance +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:54:02.294230"], ["updated_at", "2019-07-04 04:54:02.294230"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.1ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:54:02.295581"], ["updated_at", "2019-07-04 04:54:02.295581"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.296341') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.298572') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "AyncCmaasRw6K6c7ASQu"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:54:02.297408"], ["updated_at", "2019-07-04 04:54:02.299477"], ["created_at", "2019-07-04 04:54:02.299477"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? [["resource_type", "Project"], ["resource_id", 1]] +  (0.7ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------ +ProposalTest: test_should_return_hash_when_arguments_is_hash +------------------------------------------------------------ + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.303048') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.305271') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.6ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "EfEJYMazMWeg2BCb8Kqq"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n:role: admin\n"], ["expires_at", "2019-07-05 04:54:02.304105"], ["updated_at", "2019-07-04 04:54:02.306328"], ["created_at", "2019-07-04 04:54:02.306328"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "EfEJYMazMWeg2BCb8Kqq"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbols +--------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.311302') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.312760') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------------------- +ProposalTest: test_should_create_a_new_token_if_accepted_token_exists +--------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.6ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:54:02.314670"], ["updated_at", "2019-07-04 04:54:02.314670"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + User Create (0.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:54:02.316468"], ["updated_at", "2019-07-04 04:54:02.316468"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.317763') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.319449') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "F73MdoyssxVqC16pPQcF"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:54:02.318711"], ["updated_at", "2019-07-04 04:54:02.320198"], ["created_at", "2019-07-04 04:54:02.320198"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:54:02.322176"], ["accepted_at", "2019-07-04 04:54:02.322176"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.323168') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.325102') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.1ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "7zYdzPNsxeWHcSueDVN4"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:54:02.324196"], ["updated_at", "2019-07-04 04:54:02.336062"], ["created_at", "2019-07-04 04:54:02.336062"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------- +ProposalTest: test_should_return_all_arguments +---------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.339132') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.340924') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "RZyirqHMe56TNgxzF3JL"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n- admin\n- 1\n"], ["expires_at", "2019-07-05 04:54:02.340111"], ["updated_at", "2019-07-04 04:54:02.341762"], ["created_at", "2019-07-04 04:54:02.341762"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "RZyirqHMe56TNgxzF3JL"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_find_and_accept_proposal +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:54:02.345896"], ["updated_at", "2019-07-04 04:54:02.345896"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.347081') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.348579') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "tDVVmCuytEpqG1xpRw2q"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:54:02.347902"], ["updated_at", "2019-07-04 04:54:02.349491"], ["created_at", "2019-07-04 04:54:02.349491"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "tDVVmCuytEpqG1xpRw2q"], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:54:02.351469"], ["accepted_at", "2019-07-04 04:54:02.351469"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_expired +---------------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.353395') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.355368') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "sDs3neqnjHiuC986jQT7"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:54:02.354425"], ["updated_at", "2019-07-04 04:54:02.356316"], ["created_at", "2019-07-04 04:54:02.356316"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------ +ProposalTest: test_should_not_return_proposal_instance +------------------------------------------------------ + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.359352') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] + User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_not_create_a_new_token_if_token_exists +---------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.362996') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "UAqZvxTzTcdpYKxxxr6p"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2020-07-04 04:54:02.362675"], ["updated_at", "2019-07-04 04:54:02.363991"], ["created_at", "2019-07-04 04:54:02.363991"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.366015') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_token_from_to_s_method +------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.369094') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.371354') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.8ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "rrFpHsZ1zxq9ZBsJA9tL"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:54:02.370189"], ["updated_at", "2019-07-04 04:54:02.372652"], ["created_at", "2019-07-04 04:54:02.372652"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +------------------------ +ProposalTest: test_truth +------------------------ +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_bang +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.5ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:54:02.377371"], ["updated_at", "2019-07-04 04:54:02.377371"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.378781') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.380607') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "Zq8GYx42h6zUGpjqk68W"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:54:02.379790"], ["updated_at", "2019-07-04 04:54:02.381489"], ["created_at", "2019-07-04 04:54:02.381489"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.382762') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.2ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:54:02.385705"], ["reminded_at", "2019-07-04 04:54:02.385705"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.9ms) rollback transaction +  (0.2ms) begin transaction +----------------------------------------------------------------------- +ProposalTest: test_should_have_action_remind_for_notify_(existing_user) +----------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.5ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:54:02.389398"], ["updated_at", "2019-07-04 04:54:02.389398"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.390976') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.392950') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "1LJkxqZUvUjjAp3UHpy4"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:54:02.392143"], ["updated_at", "2019-07-04 04:54:02.393826"], ["created_at", "2019-07-04 04:54:02.393826"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.395130') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_respond_to_the_recipient +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 04:54:02.398409"], ["updated_at", "2019-07-04 04:54:02.398409"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.399671') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_raise_error_if_remind_is_not_true +----------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.403112') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.404881') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol_and_args +----------------------------------------------------------------- + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.407658') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.409456') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_accepted_safe +---------------------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.411144') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.412934') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" IS NULL AND "proposal_tokens"."resource_id" IS NULL LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["LIMIT", 1]] + Proposal::Token Create (0.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "Msqnnn4rkGEyJ9xrLDNm"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 04:54:02.412086"], ["updated_at", "2019-07-04 04:54:02.413675"], ["created_at", "2019-07-04 04:54:02.413675"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.1ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 04:54:02.415148"], ["accepted_at", "2019-07-04 04:54:02.415148"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------- +ProposalTest: test_should_accept_a_resource +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.5ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:54:02.417775"], ["updated_at", "2019-07-04 04:54:02.417775"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.419132') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.420883') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] + Proposal::Token Create (0.3ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "i7Rtd64ZzsAdpsrvHLbc"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 04:54:02.420068"], ["updated_at", "2019-07-04 04:54:02.422204"], ["created_at", "2019-07-04 04:54:02.422204"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.3ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:54:02.424164"], ["updated_at", "2019-07-04 04:54:02.424164"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.425682') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] +  (0.0ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.1ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.427330') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] + Proposal::Token Create (0.1ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "meqVReVMqRmFx3qPBGr6"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["expires_at", "2019-07-05 04:54:02.426595"], ["updated_at", "2019-07-04 04:54:02.428215"], ["created_at", "2019-07-04 04:54:02.428215"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.429209') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------- +ProposalTest: test_should_return_the_resource +--------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.4ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 04:54:02.431688"], ["updated_at", "2019-07-04 04:54:02.431688"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 04:54:02.432837') AND "proposal_tokens"."email" = ? AND "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? ORDER BY "proposal_tokens"."id" ASC LIMIT ? [["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["LIMIT", 1]] +  (0.6ms) rollback transaction