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

- old
+ new

@@ -10675,5 +10675,3249 @@ User Load (0.2ms) 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.3ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-03 06:35:03.611984"], ["reminded_at", "2019-07-03 06:35:03.611984"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (1.0ms) 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.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) begin transaction +---------------------------------------------------------- +ProposalTest: test_should_not_return_no_action_if_accepted +---------------------------------------------------------- + Proposal::Token Load (0.9ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:15.746255') 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 00:19:15.776315') 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.8ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "uvFzz1GNTDFQpFrxmysJ"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:19:15.765614"], ["updated_at", "2019-07-04 00:19:15.777242"], ["created_at", "2019-07-04 00:19:15.777242"]] +  (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 00:19:15.780574"], ["accepted_at", "2019-07-04 00:19:15.780574"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_find_and_accept_proposal +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.8ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:19:15.787089"], ["updated_at", "2019-07-04 00:19:15.787089"]] +  (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 00:19:15.788725') 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 00:19:15.803070') 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", "rKQvsYLKuWH2qSRprwak"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:19:15.802173"], ["updated_at", "2019-07-04 00:19:15.803983"], ["created_at", "2019-07-04 00:19:15.803983"]] +  (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", "rKQvsYLKuWH2qSRprwak"], ["LIMIT", 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 00:19:15.808956"], ["accepted_at", "2019-07-04 00:19:15.808956"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) 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 00:19:15.811781') 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 00:19:15.813570') 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", "2F7VmSX9ccSr6JJApcw6"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:19:15.812835"], ["updated_at", "2019-07-04 00:19:15.814268"], ["created_at", "2019-07-04 00:19:15.814268"]] +  (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 00:19:15.816330"], ["accepted_at", "2019-07-04 00:19:15.816330"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) 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 00:19:15.818707') 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 00:19:15.821258') 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", "9Rbz49N4b5tqnyttvWxT"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:19:15.819847"], ["updated_at", "2019-07-04 00:19:15.822572"], ["created_at", "2019-07-04 00:19:15.822572"]] +  (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 00:19:15.824553"], ["accepted_at", "2019-07-04 00:19:15.824553"], ["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 00:19:15.826922') 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 00:19:15.828839') 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", "i7sNNzy7mAHLxZSLMtqQ"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n:role: admin\n"], ["expires_at", "2019-07-05 00:19:15.827998"], ["updated_at", "2019-07-04 00:19:15.829650"], ["created_at", "2019-07-04 00:19:15.829650"]] +  (0.2ms) 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", "i7sNNzy7mAHLxZSLMtqQ"], ["LIMIT", 1]] +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_all_proposals_for_type +------------------------------------------------------- + Proposal::Token Load (0.6ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:15.837774') 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 00:19:15.840341') 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", "iquxidFbyzU2esT8CNSA"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:19:15.839295"], ["updated_at", "2019-07-04 00:19:15.841336"], ["created_at", "2019-07-04 00:19:15.841336"]] +  (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.8ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol +-------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:15.845665') 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 00:19:15.848643') 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.2ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_proposer_instance +---------------------------------------------------------------- +  (0.2ms) 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 00:19:15.852765"], ["updated_at", "2019-07-04 00:19:15.852765"]] +  (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 00:19:15.856068') 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 00:19:15.859520') 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", "yfkJF8pVrJAVne3XhjF8"], ["email", "user@example.com"], ["proposable_type", "User"], ["proposer_type", "User"], ["proposer_id", 1], ["expires_at", "2019-07-05 00:19:15.857882"], ["updated_at", "2019-07-04 00:19:15.861002"], ["created_at", "2019-07-04 00:19:15.861002"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposer_type" = ? AND "proposal_tokens"."proposer_id" = ? [["proposer_type", "User"], ["proposer_id", 1]] +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------------- +ProposalTest: test_should_have_action_remind_for_notify_(existing_user) +----------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + User Create (1.0ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:19:15.867720"], ["updated_at", "2019-07-04 00:19:15.867720"]] +  (0.4ms) 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 00:19:15.871086') 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.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 00:19:15.874456') 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", "UHZvSMhWA6Z2sd3pzfMF"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:19:15.873131"], ["updated_at", "2019-07-04 00:19:15.875596"], ["created_at", "2019-07-04 00:19:15.875596"]] +  (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 00:19:15.877277') 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.4ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.8ms) rollback transaction +  (0.2ms) begin transaction +----------------------------------------------------- +ProposalTest: test_should_create_valid_proposal_token +----------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:15.882947') 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.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:15.887116') 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", "d8cgWcDrxuFcbnVpexKQ"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:19:15.885036"], ["updated_at", "2019-07-04 00:19:15.888747"], ["created_at", "2019-07-04 00:19:15.888747"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------------ +ProposalTest: test_should_have_action_remind_for_invite_(new_user) +------------------------------------------------------------------ + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:15.893787') 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 00:19:15.895981') 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", "i4KaSTsM1xwEnypd5zuG"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:19:15.895120"], ["updated_at", "2019-07-04 00:19:15.896838"], ["created_at", "2019-07-04 00:19:15.896838"]] +  (0.3ms) 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 00:19:15.899337') 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.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.6ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_token_from_to_s_method +------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:15.910393') 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.4ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:15.912674') 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", "R7Ls84Ky8eAtoBkEA3up"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:19:15.911727"], ["updated_at", "2019-07-04 00:19:15.914013"], ["created_at", "2019-07-04 00:19:15.914013"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) 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.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:15.922841') 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", "6vu1myxUNkWzqW35jsZq"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2020-07-04 00:19:15.922163"], ["updated_at", "2019-07-04 00:19:15.924152"], ["created_at", "2019-07-04 00:19:15.924152"]] +  (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 00:19:15.927097') 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.9ms) rollback transaction +  (0.5ms) begin transaction +---------------------------------------------- +ProposalTest: test_should_return_all_arguments +---------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:15.932408') 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 00:19:15.934852') 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", "KwH9cJy2B4AW3gpuqCH1"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n- admin\n- 1\n"], ["expires_at", "2019-07-05 00:19:15.933947"], ["updated_at", "2019-07-04 00:19:15.935968"], ["created_at", "2019-07-04 00:19:15.935968"]] +  (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", "KwH9cJy2B4AW3gpuqCH1"], ["LIMIT", 1]] +  (0.9ms) 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 00:19:15.941892') 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 00:19:15.943852') 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_validate_arguments_with_symbols +--------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:15.945662') 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:19:15.949293') 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_truth +------------------------ +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_resource_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 00:19:15.953424"], ["updated_at", "2019-07-04 00:19:15.953424"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.6ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:19:15.961728"], ["updated_at", "2019-07-04 00:19:15.961728"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.9ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:15.963712') 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 00:19:15.968266') 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", "oPuvzi2xqQyL8xEzptpd"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:19:15.966671"], ["updated_at", "2019-07-04 00:19:15.969572"], ["created_at", "2019-07-04 00:19:15.969572"]] +  (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.8ms) rollback transaction +  (0.2ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_respond_to_the_recipient +-------------------------------------------------- +  (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 00:19:15.975305"], ["updated_at", "2019-07-04 00:19:15.975305"]] +  (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 00:19:15.976869') 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]] +  (1.0ms) rollback transaction +  (0.2ms) begin transaction +--------------------------------------------- +ProposalTest: test_should_return_the_resource +--------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.6ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:19:15.983328"], ["updated_at", "2019-07-04 00:19:15.983328"]] +  (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 00:19:15.985260') 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.8ms) rollback transaction +  (0.3ms) begin transaction +------------------------------------------------------ +ProposalTest: test_should_not_return_proposal_instance +------------------------------------------------------ + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:15.990619') 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_add_errors_when_not_acceptable_expired +---------------------------------------------------------------- + Proposal::Token Load (0.7ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:15.995348') 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.2ms) 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 00:19:16.000158') 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", "mR9s1uAs7RDXWqyuip2r"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:19:15.998222"], ["updated_at", "2019-07-04 00:19:16.001579"], ["created_at", "2019-07-04 00:19:16.001579"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.0ms) rollback transaction +  (0.1ms) 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 00:19:16.007390"], ["updated_at", "2019-07-04 00:19:16.007390"]] +  (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 00:19:16.008896') 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 00:19:16.010973') 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", "fmCQrGuwa2zDSFXMfzUy"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:19:16.010057"], ["updated_at", "2019-07-04 00:19:16.011921"], ["created_at", "2019-07-04 00:19:16.011921"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:16.014721') 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 00:19:16.018425"], ["reminded_at", "2019-07-04 00:19:16.018425"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.2ms) begin transaction +--------------------------------------------------------------------- +ProposalTest: test_should_create_a_new_token_if_accepted_token_exists +--------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.7ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:19:16.021576"], ["updated_at", "2019-07-04 00:19:16.021576"]] +  (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 00:19:16.024132"], ["updated_at", "2019-07-04 00:19:16.024132"]] +  (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 00:19:16.025293') 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 00:19:16.027413') 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", "Vma8ZVz54fBdAjMgpsje"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:19:16.026506"], ["updated_at", "2019-07-04 00:19:16.028506"], ["created_at", "2019-07-04 00:19:16.028506"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.3ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 00:19:16.031946"], ["accepted_at", "2019-07-04 00:19:16.031946"], ["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 00:19:16.034069') 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 00:19:16.036005') 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", "j3ALoA3s2mpwdjziy73e"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:19:16.035184"], ["updated_at", "2019-07-04 00:19:16.036979"], ["created_at", "2019-07-04 00:19:16.036979"]] +  (0.2ms) 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.5ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:19:16.041441"], ["updated_at", "2019-07-04 00:19:16.041441"]] +  (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 00:19:16.042934') 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 00:19:16.045106') 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", "ugeLjApoxZ2aA5c9xBxn"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:19:16.044163"], ["updated_at", "2019-07-04 00:19:16.046064"], ["created_at", "2019-07-04 00:19:16.046064"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:16.049163') 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 00:19:16.061510"], ["reminded_at", "2019-07-04 00:19:16.061510"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.0ms) rollback transaction +  (0.3ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_invite +----------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:16.065469') 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 00:19:16.067622') 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 00:19:16.069579') 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_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 00:19:16.072443') 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 00:19:16.075302') 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_respond_to_the_resource +------------------------------------------------- +  (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 00:19:16.078081"], ["updated_at", "2019-07-04 00:19:16.078081"]] +  (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 00:19:16.080113"], ["updated_at", "2019-07-04 00:19:16.080113"]] +  (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 00:19:16.081419') 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.8ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_notify +----------------------------------------------------------- +  (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 00:19:16.084981"], ["updated_at", "2019-07-04 00:19:16.084981"]] +  (0.4ms) 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 00:19:16.087463') 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:19:16.090329') 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.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:16.093221') 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.6ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_return_proposal_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 00:19:16.096274"], ["updated_at", "2019-07-04 00:19:16.096274"]] +  (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 00:19:16.098098') 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.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:16.101239') 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.6ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_raise_error_if_remind_is_not_true +----------------------------------------------------------- + Proposal::Token Load (0.9ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:19:16.103656') 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 00:19:16.107287') 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.2ms) 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 00:19:16.111001') 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_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 00:19:16.114716"], ["updated_at", "2019-07-04 00:19:16.114716"]] +  (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 00:19:16.117242') 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 00:19:16.119903') 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.6ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "ArxrjQx8AGRYvXKSeHsL"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:19:16.118779"], ["updated_at", "2019-07-04 00:19:16.121300"], ["created_at", "2019-07-04 00:19:16.121300"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + Project Create (0.2ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:19:16.124900"], ["updated_at", "2019-07-04 00:19:16.124900"]] +  (0.2ms) 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 00:19:16.126734') 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 00:19:16.129243') 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", "BU4Wm4Ab76ByxgZoFVyy"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["expires_at", "2019-07-05 00:19:16.128208"], ["updated_at", "2019-07-04 00:19:16.130307"], ["created_at", "2019-07-04 00:19:16.130307"]] +  (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 00:19:16.131752') 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.7ms) rollback transaction +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (1.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.1ms) commit transaction +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (5.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (0.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.1ms) commit transaction +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (1.0ms) 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.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (0.7ms) 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_safe +---------------------------------------------------------------------- + Proposal::Token Load (1.0ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:17.881218') 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 00:25:17.908971') 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.7ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "JUpnskYFvwqHfaFsYhfS"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:25:17.899941"], ["updated_at", "2019-07-04 00:25:17.909893"], ["created_at", "2019-07-04 00:25:17.909893"]] +  (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 00:25:17.913011"], ["accepted_at", "2019-07-04 00:25:17.913011"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) 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 00:25:17.915294') 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 00:25:17.916787') 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_and_args +----------------------------------------------------------------- + Proposal::Token Load (0.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:17.918034') 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 00:25:17.919730') 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_instance +------------------------------------------------------ + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:17.921412') 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.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_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 00:25:17.927129') 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 00:25:17.929419') 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", "shsSG6MXU7L3QWszhJCe"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:25:17.928215"], ["updated_at", "2019-07-04 00:25:17.930590"], ["created_at", "2019-07-04 00:25:17.930590"]] +  (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 00:25:17.932874"], ["accepted_at", "2019-07-04 00:25:17.932874"], ["id", 1]] +  (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.8ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:25:17.940818"], ["updated_at", "2019-07-04 00:25:17.940818"]] +  (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 00:25:17.942966') 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 00:25:17.945071') 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", "k1dAdJpdC81SrkqZr3vC"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:25:17.944023"], ["updated_at", "2019-07-04 00:25:17.946554"], ["created_at", "2019-07-04 00:25:17.946554"]] +  (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 00:25:17.948504') 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 00:25:17.953889"], ["reminded_at", "2019-07-04 00:25:17.953889"], ["id", 1]] +  (0.1ms) 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.8ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:25:17.962228"], ["updated_at", "2019-07-04 00:25:17.962228"]] +  (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 00:25:17.964025') 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 00:25:17.965720') 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", "KPrypw18CmESGE1cnn8k"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:25:17.964984"], ["updated_at", "2019-07-04 00:25:17.966418"], ["created_at", "2019-07-04 00:25:17.966418"]] +  (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 00:25:17.968070"], ["updated_at", "2019-07-04 00:25:17.968070"]] +  (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 00:25:17.968816') 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 00:25:17.970396') 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", "QqDsoqtkV3XpsjDq5AZm"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["expires_at", "2019-07-05 00:25:17.969635"], ["updated_at", "2019-07-04 00:25:17.971506"], ["created_at", "2019-07-04 00:25:17.971506"]] +  (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 00:25:17.972869') 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_return_token_from_to_s_method +------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:17.975203') 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 00:25:17.978173') 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", "uxNGTWx3shW3LSNjdZrv"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:25:17.976827"], ["updated_at", "2019-07-04 00:25:17.979321"], ["created_at", "2019-07-04 00:25:17.979321"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) 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.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:17.997741') 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", "fQpkxfyMZhrxpMWCBsiz"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2020-07-04 00:25:17.997297"], ["updated_at", "2019-07-04 00:25:17.998755"], ["created_at", "2019-07-04 00:25:17.998755"]] +  (0.1ms) 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 00:25:18.001271') 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.7ms) rollback transaction +  (0.1ms) 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 00:25:18.004668"], ["updated_at", "2019-07-04 00:25:18.004668"]] +  (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 00:25:18.006240"], ["updated_at", "2019-07-04 00:25:18.006240"]] +  (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 00:25:18.007178') 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 00:25:18.009065') 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", "gNZpzQkhXpo7tyyNuLrF"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:25:18.008145"], ["updated_at", "2019-07-04 00:25:18.010064"], ["created_at", "2019-07-04 00:25:18.010064"]] +  (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.6ms) 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 00:25:18.013691"], ["updated_at", "2019-07-04 00:25:18.013691"]] +  (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 00:25:18.014840') 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_return_hash_when_arguments_is_hash +------------------------------------------------------------ + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:18.017190') 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 00:25:18.019080') 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", "jSHTixjVpLvHGfQQLrNJ"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n:role: admin\n"], ["expires_at", "2019-07-05 00:25:18.018336"], ["updated_at", "2019-07-04 00:25:18.019753"], ["created_at", "2019-07-04 00:25:18.019753"]] +  (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", "jSHTixjVpLvHGfQQLrNJ"], ["LIMIT", 1]] +  (0.7ms) 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 00:25:18.025254') 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 00:25:18.027548') 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_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 00:25:18.031094"], ["updated_at", "2019-07-04 00:25:18.031094"]] +  (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 00:25:18.032634"], ["updated_at", "2019-07-04 00:25:18.032634"]] +  (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 00:25:18.033992') 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 00:25:18.036602') 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", "ey4p2FtSc968pYqzqVWv"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:25:18.035202"], ["updated_at", "2019-07-04 00:25:18.038039"], ["created_at", "2019-07-04 00:25:18.038039"]] +  (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 00:25:18.039916"], ["accepted_at", "2019-07-04 00:25:18.039916"], ["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 00:25:18.040889') 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 00:25:18.043204') 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", "KMpsLmkybKqsBy6hD5yF"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:25:18.042172"], ["updated_at", "2019-07-04 00:25:18.044705"], ["created_at", "2019-07-04 00:25:18.044705"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +------------------------ +ProposalTest: test_truth +------------------------ +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_all_proposals_for_type +------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:18.049129') 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 00:25:18.051576') 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", "4eMsXz2zgzxeF8RhzzUx"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:25:18.050644"], ["updated_at", "2019-07-04 00:25:18.052527"], ["created_at", "2019-07-04 00:25:18.052527"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? [["proposable_type", "User"]] +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_find_and_accept_proposal +-------------------------------------------------- +  (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 00:25:18.057727"], ["updated_at", "2019-07-04 00:25:18.057727"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:18.059752') 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 00:25:18.063409') 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", "Kt3nVwKyGgANYQ5vPppS"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:25:18.061740"], ["updated_at", "2019-07-04 00:25:18.064682"], ["created_at", "2019-07-04 00:25:18.064682"]] +  (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", "Kt3nVwKyGgANYQ5vPppS"], ["LIMIT", 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 00:25:18.068285"], ["accepted_at", "2019-07-04 00:25:18.068285"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_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.7ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:25:18.072606"], ["updated_at", "2019-07-04 00:25:18.072606"]] +  (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 00:25:18.074660') 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 00:25:18.077327') 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", "proposer_type", "proposer_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "DxiNs5q3Nvwchq12zs8d"], ["email", "user@example.com"], ["proposable_type", "User"], ["proposer_type", "User"], ["proposer_id", 1], ["expires_at", "2019-07-05 00:25:18.076150"], ["updated_at", "2019-07-04 00:25:18.078767"], ["created_at", "2019-07-04 00:25:18.078767"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposer_type" = ? AND "proposal_tokens"."proposer_id" = ? [["proposer_type", "User"], ["proposer_id", 1]] +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_return_proposal_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 00:25:18.084103"], ["updated_at", "2019-07-04 00:25:18.084103"]] +  (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 00:25:18.085690') 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.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:18.088889') 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.7ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_expired +---------------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:18.092290') 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 00:25:18.096783') 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", "TFAHXUwVVmapg9RPs2ah"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:25:18.094012"], ["updated_at", "2019-07-04 00:25:18.098471"], ["created_at", "2019-07-04 00:25:18.098471"]] +  (0.1ms) 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.6ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:18.102958') 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 00:25:18.106312') 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", "iydW98zRbqdVizN4YZ1s"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:25:18.104903"], ["updated_at", "2019-07-04 00:25:18.107764"], ["created_at", "2019-07-04 00:25:18.107764"]] +  (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 00:25:18.109971') 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.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.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_should_create_valid_proposal_token +----------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:18.119604') 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 00:25:18.122708') 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", "ALqVjmzuQdHnyjiGFmT3"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:25:18.121549"], ["updated_at", "2019-07-04 00:25:18.123696"], ["created_at", "2019-07-04 00:25:18.123696"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.9ms) rollback transaction +  (0.2ms) 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 00:25:18.128303') 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_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 00:25:18.131396"], ["updated_at", "2019-07-04 00:25:18.131396"]] +  (0.1ms) 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 00:25:18.132840"], ["updated_at", "2019-07-04 00:25:18.132840"]] +  (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 00:25:18.134145') 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]] +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbols +--------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:18.138231') 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 00:25:18.140516') 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_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 00:25:18.143106"], ["updated_at", "2019-07-04 00:25:18.143106"]] +  (0.2ms) 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 00:25:18.145525') 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.6ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------- +ProposalTest: test_should_return_all_arguments +---------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:18.149705') 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 00:25:18.152338') 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", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "pgS97Uizgd35q2Suq446"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n- admin\n- 1\n"], ["expires_at", "2019-07-05 00:25:18.151147"], ["updated_at", "2019-07-04 00:25:18.153661"], ["created_at", "2019-07-04 00:25:18.153661"]] +  (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", "pgS97Uizgd35q2Suq446"], ["LIMIT", 1]] +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_notify +----------------------------------------------------------- +  (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 00:25:18.161029"], ["updated_at", "2019-07-04 00:25:18.161029"]] +  (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 00:25:18.163739') 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 00:25:18.165712') 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.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:18.168506') 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.8ms) rollback transaction +  (0.3ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_invite +----------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:18.172393') 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 00:25:18.174519') 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.4ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:25:18.176690') 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_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 00:25:18.181150"], ["updated_at", "2019-07-04 00:25:18.181150"]] +  (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 00:25:18.183400') 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 00:25:18.186339') 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", "fmr8Aq956QSRqhtZU2Gq"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:25:18.185065"], ["updated_at", "2019-07-04 00:25:18.187834"], ["created_at", "2019-07-04 00:25:18.187834"]] +  (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 00:25:18.190333') 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.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 00:25:18.197100') 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 00:25:18.200701') 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", "z2TGsTj9XCXxCVKRjn5t"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:25:18.199110"], ["updated_at", "2019-07-04 00:25:18.202268"], ["created_at", "2019-07-04 00:25:18.202268"]] +  (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 00:25:18.204498"], ["accepted_at", "2019-07-04 00:25:18.204498"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) 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 00:25:18.208644"], ["updated_at", "2019-07-04 00:25:18.208644"]] +  (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 00:25:18.210336') 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 00:25:18.213609') 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", "Rq3HRWprR8EdAasE7A55"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:25:18.212270"], ["updated_at", "2019-07-04 00:25:18.214641"], ["created_at", "2019-07-04 00:25:18.214641"]] +  (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 00:25:18.215963') 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 00:25:18.219352"], ["reminded_at", "2019-07-04 00:25:18.219352"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.9ms) rollback transaction +  (0.2ms) 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 00:25:18.223128') 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 00:25:18.225325') 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 +  (1.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (0.7ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.1ms) commit transaction +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) begin transaction +------------------------------------------- +ProposalTest: test_should_accept_a_resource +------------------------------------------- +  (0.4ms) SAVEPOINT active_record_1 + Project Create (2.8ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:27:45.259516"], ["updated_at", "2019-07-04 00:27:45.259516"]] +  (0.3ms) 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 00:27:45.296898') 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 00:27:45.374786') 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 (1.5ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "W9xsqCkRuqhAAeAwtQZx"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:27:45.345759"], ["updated_at", "2019-07-04 00:27:45.376399"], ["created_at", "2019-07-04 00:27:45.376399"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + Project Create (0.2ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:27:45.380806"], ["updated_at", "2019-07-04 00:27:45.380806"]] +  (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 00:27:45.382354') 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 00:27:45.386156') 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", "uypfXb3grpkmA1xkeLUT"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["expires_at", "2019-07-05 00:27:45.383876"], ["updated_at", "2019-07-04 00:27:45.387495"], ["created_at", "2019-07-04 00:27:45.387495"]] +  (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 00:27:45.389070') 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.6ms) 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 00:27:45.394053') 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 00:27:45.399358') 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_all_arguments +---------------------------------------------- + Proposal::Token Load (1.2ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.402696') 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.5ms) 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 00:27:45.407888') 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", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "EwvzrcL8Psbq1BjavnZ3"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n- admin\n- 1\n"], ["expires_at", "2019-07-05 00:27:45.406157"], ["updated_at", "2019-07-04 00:27:45.409095"], ["created_at", "2019-07-04 00:27:45.409095"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "EwvzrcL8Psbq1BjavnZ3"], ["LIMIT", 1]] +  (1.3ms) 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 00:27:45.425573') 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 00:27:45.428538') 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 (1.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["LIMIT", 1]] +  (0.2ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_notify +----------------------------------------------------------- +  (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 00:27:45.447307"], ["updated_at", "2019-07-04 00:27:45.447307"]] +  (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 00:27:45.449651') 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 00:27:45.451927') 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.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.455728') 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.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.9ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.465635') 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", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "6wW6BQHts7JpETxgteRP"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2020-07-04 00:27:45.465171"], ["updated_at", "2019-07-04 00:27:45.508699"], ["created_at", "2019-07-04 00:27:45.508699"]] +  (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 00:27:45.512496') 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.1ms) begin transaction +------------------------ +ProposalTest: test_truth +------------------------ +  (0.1ms) 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 00:27:45.516824') 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 00:27:45.519377') 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 (18.3ms) 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 00:27:45.553876') 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_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 00:27:45.559404') 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_proposals_for_resource_instance +---------------------------------------------------------------- +  (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 00:27:45.568549"], ["updated_at", "2019-07-04 00:27:45.568549"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Project Create (2.8ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:27:45.572527"], ["updated_at", "2019-07-04 00:27:45.572527"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (10.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.576677') 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 00:27:45.591238') 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", "Rp7pTXPMqxsH3MeXgaYe"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:27:45.589381"], ["updated_at", "2019-07-04 00:27:45.592868"], ["created_at", "2019-07-04 00:27:45.592868"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.4ms) 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.1ms) begin transaction +---------------------------------------------------------- +ProposalTest: test_should_not_return_no_action_if_accepted +---------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.600496') 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 00:27:45.603029') 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.9ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "fpUG8VsgVnnjLoU8q7VH"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:27:45.602016"], ["updated_at", "2019-07-04 00:27:45.604184"], ["created_at", "2019-07-04 00:27:45.604184"]] +  (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 00:27:45.608068"], ["accepted_at", "2019-07-04 00:27:45.608068"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------- +ProposalTest: test_should_create_valid_proposal_token +----------------------------------------------------- + Proposal::Token Load (31.0ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.611025') 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 00:27:45.649161') 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", "GWcC6REdAZRSMMsD7s9n"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:27:45.644031"], ["updated_at", "2019-07-04 00:27:45.650407"], ["created_at", "2019-07-04 00:27:45.650407"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------------ +ProposalTest: test_should_have_action_remind_for_invite_(new_user) +------------------------------------------------------------------ + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.653919') 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.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 00:27:45.656831') 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", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "B7zrHnJHsE75sKzmGY2j"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:27:45.655385"], ["updated_at", "2019-07-04 00:27:45.658047"], ["created_at", "2019-07-04 00:27:45.658047"]] +  (0.2ms) 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 00:27:45.661714') 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.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.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_should_validate_arguments_with_symbols +--------------------------------------------------------- + Proposal::Token Load (0.9ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.677389') 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:27:45.680682') 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_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 00:27:45.683223') 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:27:45.685846') 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_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 00:27:45.688828') 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 00:27:45.690932') 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_instance +------------------------------------------------------ + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.693296') 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_add_errors_when_not_acceptable_accepted +----------------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.701770') 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 00:27:45.707092') 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", "VzkUsVg1F83ea4uyssSB"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:27:45.705862"], ["updated_at", "2019-07-04 00:27:45.708281"], ["created_at", "2019-07-04 00:27:45.708281"]] +  (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 00:27:45.710747"], ["accepted_at", "2019-07-04 00:27:45.710747"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.2ms) 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 00:27:45.714470"], ["updated_at", "2019-07-04 00:27:45.714470"]] +  (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 00:27:45.722597') 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.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.735043') 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.7ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------- +ProposalTest: test_should_return_the_resource +--------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.6ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:27:45.738383"], ["updated_at", "2019-07-04 00:27:45.738383"]] +  (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 00:27:45.740389') 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_set_reminded_bang +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (2.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:27:45.748550"], ["updated_at", "2019-07-04 00:27:45.748550"]] +  (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 00:27:45.758264') 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 00:27:45.766357') 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", "gdCywyGhHC1FiGZpKzor"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:27:45.764992"], ["updated_at", "2019-07-04 00:27:45.767652"], ["created_at", "2019-07-04 00:27:45.767652"]] +  (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 00:27:45.769272') 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 00:27:45.773121"], ["reminded_at", "2019-07-04 00:27:45.773121"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) 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 00:27:45.776344') 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 00:27:45.780590') 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", "21nCjeGPTSfB4Yziqyqt"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n:role: admin\n"], ["expires_at", "2019-07-05 00:27:45.778067"], ["updated_at", "2019-07-04 00:27:45.782064"], ["created_at", "2019-07-04 00:27:45.782064"]] +  (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", "21nCjeGPTSfB4Yziqyqt"], ["LIMIT", 1]] +  (2.0ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_all_proposals_for_type +------------------------------------------------------- + Proposal::Token Load (1.0ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.790817') 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 00:27:45.794072') 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", "9pMpj2Gt4yDdiRpxfHG9"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:27:45.792930"], ["updated_at", "2019-07-04 00:27:45.795253"], ["created_at", "2019-07-04 00:27:45.795253"]] +  (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.8ms) 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 00:27:45.804449') 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 00:27:45.806941') 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.9ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "rAiqiaT5iL1qUHfz5vrs"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:27:45.805857"], ["updated_at", "2019-07-04 00:27:45.808110"], ["created_at", "2019-07-04 00:27:45.808110"]] +  (0.2ms) 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 00:27:45.811369"], ["accepted_at", "2019-07-04 00:27:45.811369"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) 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 00:27:45.816777"], ["updated_at", "2019-07-04 00:27:45.816777"]] +  (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 00:27:45.818460') 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.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.821583') 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", "proposer_type", "proposer_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "h39EqSuxMPWESZM8Lgiq"], ["email", "user@example.com"], ["proposable_type", "User"], ["proposer_type", "User"], ["proposer_id", 1], ["expires_at", "2019-07-05 00:27:45.819828"], ["updated_at", "2019-07-04 00:27:45.822954"], ["created_at", "2019-07-04 00:27:45.822954"]] +  (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.6ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_find_and_accept_proposal +-------------------------------------------------- +  (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 00:27:45.832104"], ["updated_at", "2019-07-04 00:27:45.832104"]] +  (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 00:27:45.835632') 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 00:27:45.858581') 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", "jfeeS6gfB9L8Aofr9WAS"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:27:45.857403"], ["updated_at", "2019-07-04 00:27:45.859803"], ["created_at", "2019-07-04 00:27:45.859803"]] +  (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", "jfeeS6gfB9L8Aofr9WAS"], ["LIMIT", 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 00:27:45.869706"], ["accepted_at", "2019-07-04 00:27:45.869706"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_token_from_to_s_method +------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.873006') 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 00:27:45.878200') 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", "v3S3856A1EMCVzuGtnGZ"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:27:45.876899"], ["updated_at", "2019-07-04 00:27:45.879711"], ["created_at", "2019-07-04 00:27:45.879711"]] +  (0.1ms) RELEASE SAVEPOINT active_record_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 (2.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:27:45.893457"], ["updated_at", "2019-07-04 00:27:45.893457"]] +  (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 00:27:45.899479') 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 00:27:45.903563') 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", "xogQqztnkRFhHCQc4G9h"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:27:45.902278"], ["updated_at", "2019-07-04 00:27:45.904782"], ["created_at", "2019-07-04 00:27:45.904782"]] +  (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 00:27:45.906500') 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.2ms) 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 (0.5ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:27:45.922336"], ["updated_at", "2019-07-04 00:27:45.922336"]] +  (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 00:27:45.924280"], ["updated_at", "2019-07-04 00:27:45.924280"]] +  (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 00:27:45.925510') 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 00:27:45.927920') 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", "AsCfhWsx1JvJiFyBqt25"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:27:45.926900"], ["updated_at", "2019-07-04 00:27:45.929265"], ["created_at", "2019-07-04 00:27:45.929265"]] +  (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 00:27:45.933538"], ["accepted_at", "2019-07-04 00:27:45.933538"], ["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 00:27:45.934663') 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 00:27:45.936963') 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", "qxUvhUzUMAsXGy8najwh"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:27:45.935929"], ["updated_at", "2019-07-04 00:27:45.938257"], ["created_at", "2019-07-04 00:27:45.938257"]] +  (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.6ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.942558') 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 00:27:45.945629') 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", "FVxZnDeLd5uissoj1pik"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:27:45.944445"], ["updated_at", "2019-07-04 00:27:45.946750"], ["created_at", "2019-07-04 00:27:45.946750"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (3.7ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------- +ProposalTest: test_should_respond_to_the_resource +------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (1.8ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:27:45.968268"], ["updated_at", "2019-07-04 00:27:45.968268"]] +  (0.2ms) 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 00:27:45.974615"], ["updated_at", "2019-07-04 00:27:45.974615"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.979374') 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]] +  (1.6ms) rollback transaction +  (0.4ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_safe +------------------------------------------- +  (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 00:27:45.996360"], ["updated_at", "2019-07-04 00:27:45.996360"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:45.998366') 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.7ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:27:46.005045') 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", "ArFMMJmk8yWxzsUeVmPX"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:27:46.000635"], ["updated_at", "2019-07-04 00:27:46.008583"], ["created_at", "2019-07-04 00:27:46.008583"]] +  (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 00:27:46.011209') 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.2ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.4ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 00:27:46.017802"], ["reminded_at", "2019-07-04 00:27:46.017802"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.9ms) rollback transaction +  (0.2ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_respond_to_the_recipient +-------------------------------------------------- +  (11.2ms) SAVEPOINT active_record_1 + User Create (1.0ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:27:46.034669"], ["updated_at", "2019-07-04 00:27:46.034669"]] +  (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 00:27:46.037594') 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.7ms) rollback transaction +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (0.6ms) 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.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) begin transaction +------------------------------------------------------ +ProposalTest: test_should_not_return_proposal_instance +------------------------------------------------------ + Proposal::Token Load (0.9ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.457778') 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]] +  (0.1ms) 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 00:28:23.509255') 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 00:28:23.511588') 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.9ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "tNbQVhPeVW9TtEdfkWN1"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:28:23.510276"], ["updated_at", "2019-07-04 00:28:23.512856"], ["created_at", "2019-07-04 00:28:23.512856"]] +  (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 00:28:23.516997') 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.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.9ms) 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 00:28:23.530428') 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 00:28:23.532738') 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", "som6sbNNcikwxCSNP6yD"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n- admin\n- 1\n"], ["expires_at", "2019-07-05 00:28:23.531739"], ["updated_at", "2019-07-04 00:28:23.533621"], ["created_at", "2019-07-04 00:28:23.533621"]] +  (0.2ms) 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", "som6sbNNcikwxCSNP6yD"], ["LIMIT", 1]] +  (0.8ms) rollback transaction +  (0.1ms) 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 00:28:23.540604') 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 00:28:23.543007') 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", "iyWNacidcHiZGKh4fs3R"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:28:23.542048"], ["updated_at", "2019-07-04 00:28:23.543985"], ["created_at", "2019-07-04 00:28:23.543985"]] +  (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 00:28:23.548514"], ["accepted_at", "2019-07-04 00:28:23.548514"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.8ms) rollback transaction +  (0.2ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_resource_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 00:28:23.559943"], ["updated_at", "2019-07-04 00:28:23.559943"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + Project Create (0.2ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:28:23.570268"], ["updated_at", "2019-07-04 00:28:23.570268"]] +  (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 00:28:23.571888') 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 00:28:23.574243') 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", "CqMAjVNsQMkMGYg9Aubh"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:28:23.573222"], ["updated_at", "2019-07-04 00:28:23.575222"], ["created_at", "2019-07-04 00:28:23.575222"]] +  (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.1ms) begin transaction +-------------------------------------------- +ProposalTest: test_user_should_have_proposal +-------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.578915') 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_have_action_remind_for_notify_(existing_user) +----------------------------------------------------------------------- +  (0.2ms) 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 00:28:23.584956"], ["updated_at", "2019-07-04 00:28:23.584956"]] +  (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 00:28:23.586758') 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 00:28:23.589898') 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", "PqVVEzhDSrjS3V2qxmrr"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:28:23.588510"], ["updated_at", "2019-07-04 00:28:23.591508"], ["created_at", "2019-07-04 00:28:23.591508"]] +  (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 00:28:23.593701') 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.9ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------- +ProposalTest: test_should_return_the_resource +--------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Project Create (0.9ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:28:23.600922"], ["updated_at", "2019-07-04 00:28:23.600922"]] +  (0.2ms) 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 00:28:23.604303') 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.8ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------- +ProposalTest: test_should_respond_to_the_resource +------------------------------------------------- +  (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 00:28:23.609956"], ["updated_at", "2019-07-04 00:28:23.609956"]] +  (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 00:28:23.612444"], ["updated_at", "2019-07-04 00:28:23.612444"]] +  (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 00:28:23.613907') 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.8ms) rollback transaction +  (0.3ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_respond_to_the_recipient +-------------------------------------------------- +  (0.2ms) 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 00:28:23.620785"], ["updated_at", "2019-07-04 00:28:23.620785"]] +  (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 00:28:23.623667') 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.7ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbols +--------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.629961') 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:28:23.633090') 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.2ms) 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 00:28:23.637816') 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:28:23.640685') 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_return_proposals_for_proposer_instance +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (3.6ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:28:23.645219"], ["updated_at", "2019-07-04 00:28:23.645219"]] +  (0.2ms) 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 00:28:23.652808') 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 00:28:23.657478') 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", "proposer_type", "proposer_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "w3HHK3zxqCrDnhcxNdpG"], ["email", "user@example.com"], ["proposable_type", "User"], ["proposer_type", "User"], ["proposer_id", 1], ["expires_at", "2019-07-05 00:28:23.655810"], ["updated_at", "2019-07-04 00:28:23.659372"], ["created_at", "2019-07-04 00:28:23.659372"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposer_type" = ? AND "proposal_tokens"."proposer_id" = ? [["proposer_type", "User"], ["proposer_id", 1]] +  (2.7ms) rollback transaction +  (0.2ms) begin transaction +----------------------------------------------------- +ProposalTest: test_should_create_valid_proposal_token +----------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.673155') 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 00:28:23.676383') 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", "odhea5jntdycm4E3gJas"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:28:23.674896"], ["updated_at", "2019-07-04 00:28:23.677544"], ["created_at", "2019-07-04 00:28:23.677544"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.9ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_bang +------------------------------------------- +  (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 00:28:23.683919"], ["updated_at", "2019-07-04 00:28:23.683919"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (1.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.686034') 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 00:28:23.690842') 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", "a32Am4aFmbyR2xKj1vjg"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:28:23.688751"], ["updated_at", "2019-07-04 00:28:23.692412"], ["created_at", "2019-07-04 00:28:23.692412"]] +  (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 00:28:23.694396') 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.2ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 00:28:23.697493"], ["reminded_at", "2019-07-04 00:28:23.697493"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------- +ProposalTest: test_should_not_return_no_action_if_accepted +---------------------------------------------------------- + Proposal::Token Load (0.6ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.701939') 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 00:28:23.705074') 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", "DcFqEyKFiDvmYscpZnVZ"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:28:23.704021"], ["updated_at", "2019-07-04 00:28:23.706046"], ["created_at", "2019-07-04 00:28:23.706046"]] +  (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 00:28:23.707965"], ["accepted_at", "2019-07-04 00:28:23.707965"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_all_proposals_for_type +------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.712908') 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.6ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.716184') 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.9ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "6HuRtpXo8uittq9sPDZo"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:28:23.715104"], ["updated_at", "2019-07-04 00:28:23.718966"], ["created_at", "2019-07-04 00:28:23.718966"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? [["proposable_type", "User"]] +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_accepted +----------------------------------------------------------------- + Proposal::Token Load (0.9ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.726191') 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.2ms) 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 00:28:23.732599') 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", "HvsZZeZWFxnMLinkLMLY"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:28:23.729589"], ["updated_at", "2019-07-04 00:28:23.734808"], ["created_at", "2019-07-04 00:28:23.734808"]] +  (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 00:28:23.738491"], ["accepted_at", "2019-07-04 00:28:23.738491"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +------------------------ +ProposalTest: test_truth +------------------------ +  (0.0ms) 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.7ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:28:23.743113"], ["updated_at", "2019-07-04 00:28:23.743113"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) 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 00:28:23.748319"], ["updated_at", "2019-07-04 00:28:23.748319"]] +  (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 00:28:23.750307') 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.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.753221') 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", "KsdbtcspNypQDqzgySth"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:28:23.752083"], ["updated_at", "2019-07-04 00:28:23.754689"], ["created_at", "2019-07-04 00:28:23.754689"]] +  (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 00:28:23.756863"], ["accepted_at", "2019-07-04 00:28:23.756863"], ["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 00:28:23.758180') 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.9ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.761059') 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", "yL8JartCh6KH2G3UiG71"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:28:23.759333"], ["updated_at", "2019-07-04 00:28:23.763311"], ["created_at", "2019-07-04 00:28:23.763311"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_invite +----------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.768567') 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 00:28:23.770943') 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 00:28:23.773446') 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_not_create_a_new_token_if_token_exists +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Exists (0.5ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.777485') 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", "zkLqP7s6B2yYeC9sDmSF"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2020-07-04 00:28:23.777055"], ["updated_at", "2019-07-04 00:28:23.778861"], ["created_at", "2019-07-04 00:28:23.778861"]] +  (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 00:28:23.782122') 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.7ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_find_and_accept_proposal +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.9ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:28:23.785496"], ["updated_at", "2019-07-04 00:28:23.785496"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (3.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.789694') 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 00:28:23.795181') 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", "gjtfz3spzekY2g1UPmp5"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:28:23.794062"], ["updated_at", "2019-07-04 00:28:23.796466"], ["created_at", "2019-07-04 00:28:23.796466"]] +  (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", "gjtfz3spzekY2g1UPmp5"], ["LIMIT", 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 00:28:23.813729"], ["accepted_at", "2019-07-04 00:28:23.813729"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol +-------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.816966') 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:28:23.819501') 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.6ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:28:23.822645"], ["updated_at", "2019-07-04 00:28:23.822645"]] +  (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 00:28:23.824469') 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 00:28:23.827217') 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 00:28:23.831083') 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.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 00:28:23.834338') 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 (2.5ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.838100') 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.8ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "UQDZVUgHBazohbbu6Aqc"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n:role: admin\n"], ["expires_at", "2019-07-05 00:28:23.835552"], ["updated_at", "2019-07-04 00:28:23.853161"], ["created_at", "2019-07-04 00:28:23.853161"]] +  (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", "UQDZVUgHBazohbbu6Aqc"], ["LIMIT", 1]] +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_token_from_to_s_method +------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.862955') 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 00:28:23.866229') 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", "Ss94MQbo7zurddFqCr5b"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:28:23.864969"], ["updated_at", "2019-07-04 00:28:23.867327"], ["created_at", "2019-07-04 00:28:23.867327"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) 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 00:28:23.872461') 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 00:28:23.874312') 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_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 00:28:23.876798"], ["updated_at", "2019-07-04 00:28:23.876798"]] +  (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 00:28:23.878168') 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.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.882063') 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_set_reminded_safe +------------------------------------------- +  (0.2ms) 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 00:28:23.885544"], ["updated_at", "2019-07-04 00:28:23.885544"]] +  (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 00:28:23.887527') 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 00:28:23.890505') 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", "QzXtrmUxLVMbyc8yTwnp"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:28:23.889382"], ["updated_at", "2019-07-04 00:28:23.891831"], ["created_at", "2019-07-04 00:28:23.891831"]] +  (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 00:28:23.893446') 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 00:28:23.895970"], ["reminded_at", "2019-07-04 00:28:23.895970"], ["id", 1]] +  (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.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.898812') 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 00:28:23.901500') 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", "wmsfVHgy1XZrs4kNdsqD"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:28:23.900221"], ["updated_at", "2019-07-04 00:28:23.903265"], ["created_at", "2019-07-04 00:28:23.903265"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------- +ProposalTest: test_should_accept_a_resource +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.6ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:28:23.909296"], ["updated_at", "2019-07-04 00:28:23.909296"]] +  (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 00:28:23.911077') 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.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.915040') 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", "SzRzf3PM739TQnucqZaq"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:28:23.912669"], ["updated_at", "2019-07-04 00:28:23.916900"], ["created_at", "2019-07-04 00:28:23.916900"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.4ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:28:23.919878"], ["updated_at", "2019-07-04 00:28:23.919878"]] +  (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 00:28:23.921950') 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 00:28:23.925351') 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.7ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "pd9ZkiPqjJTqgtcCH9iz"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["expires_at", "2019-07-05 00:28:23.923871"], ["updated_at", "2019-07-04 00:28:23.926613"], ["created_at", "2019-07-04 00:28:23.926613"]] +  (0.2ms) 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 00:28:23.929304') 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]] +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol_and_args +----------------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:28:23.933943') 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 00:28:23.938236') 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.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (1.0ms) 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_set_reminded_bang +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (1.5ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:30:15.209192"], ["updated_at", "2019-07-04 00:30:15.209192"]] +  (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 00:30:15.223791') 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 00:30:15.265230') 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.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "ywZiMzP5FqbwqPYujxBs"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:30:15.256288"], ["updated_at", "2019-07-04 00:30:15.266322"], ["created_at", "2019-07-04 00:30:15.266322"]] +  (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 00:30:15.268750') 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 00:30:15.272317"], ["reminded_at", "2019-07-04 00:30:15.272317"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) 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 00:30:15.275146') 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_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 00:30:15.277723"], ["updated_at", "2019-07-04 00:30:15.277723"]] +  (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 00:30:15.278892') 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 00:30:15.280242') 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 00:30:15.281919') 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_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 00:30:15.284026') 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 00:30:15.286213') 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_truth +------------------------ +  (0.0ms) rollback transaction +  (0.0ms) 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 00:30:15.289913"], ["updated_at", "2019-07-04 00:30:15.289913"]] +  (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 00:30:15.291031') 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 00:30:15.292630') 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", "proposer_type", "proposer_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "CR51xfDzHqk1subAWfJv"], ["email", "user@example.com"], ["proposable_type", "User"], ["proposer_type", "User"], ["proposer_id", 1], ["expires_at", "2019-07-05 00:30:15.291808"], ["updated_at", "2019-07-04 00:30:15.293694"], ["created_at", "2019-07-04 00:30:15.293694"]] +  (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_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 00:30:15.297841') 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 00:30:15.301771') 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", "ZQR3TAeXVEusGUBX43rs"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n:role: admin\n"], ["expires_at", "2019-07-05 00:30:15.299599"], ["updated_at", "2019-07-04 00:30:15.303081"], ["created_at", "2019-07-04 00:30:15.303081"]] +  (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", "ZQR3TAeXVEusGUBX43rs"], ["LIMIT", 1]] +  (0.6ms) rollback transaction +  (0.0ms) 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 00:30:15.313966"], ["updated_at", "2019-07-04 00:30:15.313966"]] +  (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 00:30:15.315930') 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 00:30:15.318084') 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", "tcFgse8MyzwYpnNi6CfK"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:30:15.317201"], ["updated_at", "2019-07-04 00:30:15.319190"], ["created_at", "2019-07-04 00:30:15.319190"]] +  (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 00:30:15.320916"], ["updated_at", "2019-07-04 00:30:15.320916"]] +  (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 00:30:15.321985') 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 00:30:15.323761') 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", "snH6R1zsVgjghqjLvEU5"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["expires_at", "2019-07-05 00:30:15.322964"], ["updated_at", "2019-07-04 00:30:15.324725"], ["created_at", "2019-07-04 00:30:15.324725"]] +  (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 00:30:15.325964') 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.6ms) rollback transaction +  (0.2ms) begin transaction +----------------------------------------------------- +ProposalTest: test_should_create_valid_proposal_token +----------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:30:15.328787') 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 00:30:15.331643') 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", "bEsFsGhezxutm6GGqAYW"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:30:15.330317"], ["updated_at", "2019-07-04 00:30:15.333247"], ["created_at", "2019-07-04 00:30:15.333247"]] +  (0.2ms) RELEASE SAVEPOINT active_record_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 00:30:15.337041"], ["updated_at", "2019-07-04 00:30:15.337041"]] +  (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 00:30:15.338864') 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 00:30:15.341418') 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", "BjKEzn1Z3Bans7sxwpJA"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:30:15.340294"], ["updated_at", "2019-07-04 00:30:15.342551"], ["created_at", "2019-07-04 00:30:15.342551"]] +  (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 00:30:15.344575') 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.2ms) 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 00:30:15.351121') 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", "MeMYqJZAJXZS9xo1vFVu"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2020-07-04 00:30:15.350401"], ["updated_at", "2019-07-04 00:30:15.352855"], ["created_at", "2019-07-04 00:30:15.352855"]] +  (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 00:30:15.355496') 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.3ms) 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 00:30:15.359063') 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 00:30:15.362119') 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", "uHcr39cu8GPcs5Npoxzw"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:30:15.360798"], ["updated_at", "2019-07-04 00:30:15.363112"], ["created_at", "2019-07-04 00:30:15.363112"]] +  (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 00:30:15.365467"], ["accepted_at", "2019-07-04 00:30:15.365467"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.2ms) begin transaction +---------------------------------------------------------- +ProposalTest: test_should_not_return_no_action_if_accepted +---------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:30:15.369065') 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 00:30:15.371853') 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", "L8k1xxbf7mzYoSC1xSi8"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:30:15.370712"], ["updated_at", "2019-07-04 00:30:15.373058"], ["created_at", "2019-07-04 00:30:15.373058"]] +  (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 00:30:15.375912"], ["accepted_at", "2019-07-04 00:30:15.375912"], ["id", 1]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_add_errors_when_not_acceptable_expired +---------------------------------------------------------------- + Proposal::Token Load (0.7ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:30:15.380344') 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 00:30:15.383459') 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", "Q1LhpxRVSx9LzxA8jGzF"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:30:15.382101"], ["updated_at", "2019-07-04 00:30:15.385008"], ["created_at", "2019-07-04 00:30:15.385008"]] +  (0.5ms) RELEASE SAVEPOINT active_record_1 +  (0.9ms) 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 00:30:15.392524') 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 00:30:15.395064') 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", "mEnYApiTDgfCsRiyniUK"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:30:15.394082"], ["updated_at", "2019-07-04 00:30:15.395973"], ["created_at", "2019-07-04 00:30:15.395973"]] +  (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 00:30:15.397305') 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]] + 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.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.6ms) 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 00:30:15.406555') 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 00:30:15.408289') 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.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:30:15.411201') 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.3ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_return_proposal_instance +-------------------------------------------------- +  (0.3ms) 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 00:30:15.419746"], ["updated_at", "2019-07-04 00:30:15.419746"]] +  (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 00:30:15.423436') 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.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:30:15.427866') 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.9ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------- +ProposalTest: test_should_respond_to_the_resource +------------------------------------------------- +  (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 00:30:15.432399"], ["updated_at", "2019-07-04 00:30:15.432399"]] +  (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 00:30:15.435710"], ["updated_at", "2019-07-04 00:30:15.435710"]] +  (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 00:30:15.437013') 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_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 00:30:15.440012') 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 00:30:15.441908') 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.1ms) begin transaction +--------------------------------------------- +ProposalTest: test_should_return_the_resource +--------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Project Create (0.6ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:30:15.445692"], ["updated_at", "2019-07-04 00:30:15.445692"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:30:15.448027') 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_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 00:30:15.452122') 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 00:30:15.454034') 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_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 00:30:15.456400"], ["updated_at", "2019-07-04 00:30:15.456400"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:30:15.457809') 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.9ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbol_and_args +----------------------------------------------------------------- + Proposal::Token Load (0.6ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:30:15.464757') 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 00:30:15.468166') 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_return_proposals_for_resource_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 00:30:15.470718"], ["updated_at", "2019-07-04 00:30:15.470718"]] +  (0.1ms) 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 00:30:15.472427"], ["updated_at", "2019-07-04 00:30:15.472427"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:30:15.473679') 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 00:30:15.479342') 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", "K9duQ75b7ngncKF7Pzxc"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:30:15.475697"], ["updated_at", "2019-07-04 00:30:15.491046"], ["created_at", "2019-07-04 00:30:15.491046"]] +  (0.1ms) 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]] +  (1.1ms) rollback transaction +  (0.2ms) 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 00:30:15.496796') 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.5ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:30:15.499276') 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", "3bDge1Z3sAs7sZbx6ZJL"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n- admin\n- 1\n"], ["expires_at", "2019-07-05 00:30:15.498145"], ["updated_at", "2019-07-04 00:30:15.501208"], ["created_at", "2019-07-04 00:30:15.501208"]] +  (0.2ms) 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", "3bDge1Z3sAs7sZbx6ZJL"], ["LIMIT", 1]] +  (0.9ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_token_from_to_s_method +------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:30:15.511301') 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 00:30:15.513603') 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", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "qXXHHPBHvpchmLWsoggH"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:30:15.512638"], ["updated_at", "2019-07-04 00:30:15.514429"], ["created_at", "2019-07-04 00:30:15.514429"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.9ms) rollback transaction +  (0.1ms) 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 00:30:15.523451"], ["updated_at", "2019-07-04 00:30:15.523451"]] +  (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 00:30:15.525025') 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 00:30:15.527674') 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", "vehvkusWEHLmrNvchoDy"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:30:15.526383"], ["updated_at", "2019-07-04 00:30:15.528817"], ["created_at", "2019-07-04 00:30:15.528817"]] +  (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 00:30:15.530304') 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.2ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "reminded_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 00:30:15.534271"], ["reminded_at", "2019-07-04 00:30:15.534271"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.3ms) rollback transaction +  (0.1ms) 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 00:30:15.539154') 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 00:30:15.541816') 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", "9ZY49v5h6Rappb4nUpbG"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:30:15.540759"], ["updated_at", "2019-07-04 00:30:15.542874"], ["created_at", "2019-07-04 00:30:15.542874"]] +  (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 00:30:15.545465"], ["accepted_at", "2019-07-04 00:30:15.545465"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_find_and_accept_proposal +-------------------------------------------------- +  (0.5ms) 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 00:30:15.550349"], ["updated_at", "2019-07-04 00:30:15.550349"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:30:15.552479') 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 00:30:15.555322') 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", "cFRNUpJGi7eh1qC4EctB"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:30:15.554164"], ["updated_at", "2019-07-04 00:30:15.556492"], ["created_at", "2019-07-04 00:30:15.556492"]] +  (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", "cFRNUpJGi7eh1qC4EctB"], ["LIMIT", 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 00:30:15.558965"], ["accepted_at", "2019-07-04 00:30:15.558965"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) 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 (0.4ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:30:15.562543"], ["updated_at", "2019-07-04 00:30:15.562543"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (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 00:30:15.564342"], ["updated_at", "2019-07-04 00:30:15.564342"]] +  (0.2ms) 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 00:30:15.566936') 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 00:30:15.569767') 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", "bzvKV4zLe4oqsAAt9LWW"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:30:15.568699"], ["updated_at", "2019-07-04 00:30:15.571205"], ["created_at", "2019-07-04 00:30:15.571205"]] +  (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 00:30:15.573321"], ["accepted_at", "2019-07-04 00:30:15.573321"], ["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 00:30:15.574516') 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 00:30:15.577887') 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", "LgxvRhjMmsWXVHisWUGx"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:30:15.576382"], ["updated_at", "2019-07-04 00:30:15.579230"], ["created_at", "2019-07-04 00:30:15.579230"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.9ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------- +ProposalTest: test_should_validate_arguments_with_symbols +--------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:30:15.583860') 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 00:30:15.586864') 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.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 00:30:15.590683') 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 00:30:15.592921') 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", "FSmLeAiHznzLRX9K3wqZ"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:30:15.591876"], ["updated_at", "2019-07-04 00:30:15.594267"], ["created_at", "2019-07-04 00:30:15.594267"]] +  (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.7ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------------ +ProposalTest: test_should_not_return_proposal_instance +------------------------------------------------------ + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:30:15.598772') 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.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (0.9ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.1ms) 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_return_hash_when_arguments_is_hash +------------------------------------------------------------ + Proposal::Token Load (0.8ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:32:25.466697') 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 00:32:25.507403') 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.9ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "r9DYUTJKKmJDtzyrWNnK"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n:role: admin\n"], ["expires_at", "2019-07-05 00:32:25.486072"], ["updated_at", "2019-07-04 00:32:25.508712"], ["created_at", "2019-07-04 00:32:25.508712"]] +  (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", "r9DYUTJKKmJDtzyrWNnK"], ["LIMIT", 1]] +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_return_proposal_instance +-------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (1.2ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:32:25.521051"], ["updated_at", "2019-07-04 00:32:25.521051"]] +  (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 00:32:25.523439') 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.6ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:32:25.526137') 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_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 00:32:25.545089"], ["updated_at", "2019-07-04 00:32:25.545089"]] +  (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 00:32:25.546756') 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 00:32:25.548440') 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", "DZMWDGL38qk5VqrQKsHj"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:32:25.547784"], ["updated_at", "2019-07-04 00:32:25.549715"], ["created_at", "2019-07-04 00:32:25.549715"]] +  (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 00:32:25.551278"], ["updated_at", "2019-07-04 00:32:25.551278"]] +  (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 00:32:25.552114') 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 00:32:25.554033') 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", "MTNaEnFKMXKNtkQuxzoe"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["expires_at", "2019-07-05 00:32:25.553176"], ["updated_at", "2019-07-04 00:32:25.554883"], ["created_at", "2019-07-04 00:32:25.554883"]] +  (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 00:32:25.556024') 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.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 00:32:25.558797') 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 00:32:25.561009') 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", "dHLxAuj78rcPvCNoT3v2"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:32:25.560065"], ["updated_at", "2019-07-04 00:32:25.561918"], ["created_at", "2019-07-04 00:32:25.561918"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) rollback transaction +  (0.3ms) 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 00:32:25.566696') 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 00:32:25.569678') 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_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 00:32:25.571564') 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 00:32:25.573829') 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", "119EZGDCgr4eTDqHqmNG"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:32:25.572845"], ["updated_at", "2019-07-04 00:32:25.574963"], ["created_at", "2019-07-04 00:32:25.574963"]] +  (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 00:32:25.577072') 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.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.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? ORDER BY "users"."id" ASC LIMIT ? [["email", "user@example.com"], ["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]] + User Load (0.3ms) 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.7ms) 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 00:32:25.588293"], ["updated_at", "2019-07-04 00:32:25.588293"]] +  (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 00:32:25.589923') 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 00:32:25.592534') 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", "xaSw2PkHXCnH7SxpGfxb"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:32:25.591198"], ["updated_at", "2019-07-04 00:32:25.593621"], ["created_at", "2019-07-04 00:32:25.593621"]] +  (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 00:32:25.595265') 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 00:32:25.598335"], ["reminded_at", "2019-07-04 00:32:25.598335"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) rollback transaction +  (0.2ms) 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 00:32:25.601834') 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 00:32:25.604624') 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", "WVd1BShyRMBSRnczEyuA"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:32:25.603377"], ["updated_at", "2019-07-04 00:32:25.605765"], ["created_at", "2019-07-04 00:32:25.605765"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.3ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 00:32:25.608631"], ["accepted_at", "2019-07-04 00:32:25.608631"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_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 00:32:25.613431') 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 00:32:25.615740') 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", "zYBZqn9Reeexv5vXZvXZ"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n- admin\n- 1\n"], ["expires_at", "2019-07-05 00:32:25.614788"], ["updated_at", "2019-07-04 00:32:25.616986"], ["created_at", "2019-07-04 00:32:25.616986"]] +  (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", "zYBZqn9Reeexv5vXZvXZ"], ["LIMIT", 1]] +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_token_from_to_s_method +------------------------------------------------------- + Proposal::Token Load (0.6ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:32:25.625778') 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 00:32:25.629211') 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", "xpQ35oxJYRrXzxRpy3rj"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:32:25.627849"], ["updated_at", "2019-07-04 00:32:25.630359"], ["created_at", "2019-07-04 00:32:25.630359"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.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 00:32:25.634611') 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:32:25.636930') 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_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 00:32:25.643634') 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", "cjRsAHUX2s5eksvSAyLJ"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2020-07-04 00:32:25.643142"], ["updated_at", "2019-07-04 00:32:25.644698"], ["created_at", "2019-07-04 00:32:25.644698"]] +  (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 00:32:25.647049') 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.8ms) 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 00:32:25.650111') 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 00:32:25.651926') 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 00:32:25.653853') 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.6ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:32:25.656944"], ["updated_at", "2019-07-04 00:32:25.656944"]] +  (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 00:32:25.659062"], ["updated_at", "2019-07-04 00:32:25.659062"]] +  (0.2ms) 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 00:32:25.660880') 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_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 00:32:25.665596"], ["updated_at", "2019-07-04 00:32:25.665596"]] +  (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 00:32:25.668516"], ["updated_at", "2019-07-04 00:32:25.668516"]] +  (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 00:32:25.670025') 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 00:32:25.672210') 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", "GsbxGGzrsYDRTwXSyos7"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:32:25.671260"], ["updated_at", "2019-07-04 00:32:25.673244"], ["created_at", "2019-07-04 00:32:25.673244"]] +  (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 00:32:25.674974"], ["accepted_at", "2019-07-04 00:32:25.674974"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:32:25.676415') 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 00:32:25.680052') 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", "S2qwy9gqvVMBxsxYE9oL"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:32:25.678202"], ["updated_at", "2019-07-04 00:32:25.681548"], ["created_at", "2019-07-04 00:32:25.681548"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) 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.6ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:32:25.685628"], ["updated_at", "2019-07-04 00:32:25.685628"]] +  (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 00:32:25.687295') 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 00:32:25.689568') 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", "TqBVY4yYxgytsQEdGohD"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:32:25.688560"], ["updated_at", "2019-07-04 00:32:25.690480"], ["created_at", "2019-07-04 00:32:25.690480"]] +  (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 00:32:25.692336') 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]] +  (1.4ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_safe +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (1.0ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:32:25.702557"], ["updated_at", "2019-07-04 00:32:25.702557"]] +  (0.2ms) 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 00:32:25.705808') 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 00:32:25.710693') 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", "58DrW7qzVvardyKjtV2g"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:32:25.707827"], ["updated_at", "2019-07-04 00:32:25.712479"], ["created_at", "2019-07-04 00:32:25.712479"]] +  (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 00:32:25.714187') 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 00:32:25.716309"], ["reminded_at", "2019-07-04 00:32:25.716309"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------ +ProposalTest: test_should_not_return_proposal_instance +------------------------------------------------------ + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:32:25.719313') 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.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:32:25.723505"], ["updated_at", "2019-07-04 00:32:25.723505"]] +  (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 00:32:25.725017') 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 00:32:25.729072') 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", "gpxPybYwzMsig7fs9p4L"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:32:25.726548"], ["updated_at", "2019-07-04 00:32:25.730837"], ["created_at", "2019-07-04 00:32:25.730837"]] +  (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", "gpxPybYwzMsig7fs9p4L"], ["LIMIT", 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 00:32:25.735493"], ["accepted_at", "2019-07-04 00:32:25.735493"], ["id", 1]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------- +ProposalTest: test_should_not_return_no_action_if_accepted +---------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:32:25.739084') 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.6ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:32:25.756150') 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", "AzvxcYUyDJQA2py5BQHV"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:32:25.752754"], ["updated_at", "2019-07-04 00:32:25.758444"], ["created_at", "2019-07-04 00:32:25.758444"]] +  (0.2ms) 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 00:32:25.761673"], ["accepted_at", "2019-07-04 00:32:25.761673"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_resource_instance +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (1.0ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:32:25.765569"], ["updated_at", "2019-07-04 00:32:25.765569"]] +  (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 00:32:25.768045"], ["updated_at", "2019-07-04 00:32:25.768045"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:32:25.768926') 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 00:32:25.772742') 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", "gvx3UTBfdSpq6jBCRwZ1"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:32:25.771272"], ["updated_at", "2019-07-04 00:32:25.773977"], ["created_at", "2019-07-04 00:32:25.773977"]] +  (0.1ms) 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.7ms) rollback transaction +  (0.1ms) 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 00:32:25.778251') 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 00:32:25.780024') 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.3ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_notify +----------------------------------------------------------- +  (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 00:32:25.784173"], ["updated_at", "2019-07-04 00:32:25.784173"]] +  (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 00:32:25.786304') 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 00:32:25.789378') 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 00:32:25.791819') 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.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 00:32:25.795309"], ["updated_at", "2019-07-04 00:32:25.795309"]] +  (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 00:32:25.796549') 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.6ms) rollback transaction +  (0.1ms) begin transaction +------------------------ +ProposalTest: test_truth +------------------------ +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------- +ProposalTest: test_should_return_all_proposals_for_type +------------------------------------------------------- + Proposal::Token Load (0.8ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:32:25.803061') 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 00:32:25.806187') 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", "qH5XNaGJB5R6vqKhby3K"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:32:25.805155"], ["updated_at", "2019-07-04 00:32:25.807150"], ["created_at", "2019-07-04 00:32:25.807150"]] +  (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.7ms) 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 00:32:25.812448"], ["updated_at", "2019-07-04 00:32:25.812448"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (1.0ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:32:25.814233') 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]] +  (1.9ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_raise_error_if_remind_is_not_true +----------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:32:25.821637') 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:32:25.825001') 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_create_valid_proposal_token +----------------------------------------------------- + Proposal::Token Load (0.9ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:32:25.828996') 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 00:32:25.834650') 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", "7Zj1sdfJj4VjtUHcKcja"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:32:25.831186"], ["updated_at", "2019-07-04 00:32:25.836238"], ["created_at", "2019-07-04 00:32:25.836238"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) 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 00:32:25.840173') 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.2ms) 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 00:32:25.842826') 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 00:32:25.844961') 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_add_errors_when_not_acceptable_accepted +----------------------------------------------------------------- + Proposal::Token Load (0.8ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:32:25.846680') 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.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:32:25.850865') 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", "ASF1pDaHXodtqJGyiHd5"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:32:25.848959"], ["updated_at", "2019-07-04 00:32:25.852024"], ["created_at", "2019-07-04 00:32:25.852024"]] +  (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 00:32:25.854621"], ["accepted_at", "2019-07-04 00:32:25.854621"], ["id", 1]] +  (0.1ms) RELEASE 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.7ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:32:25.857908"], ["updated_at", "2019-07-04 00:32:25.857908"]] +  (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 00:32:25.859987') 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 00:32:25.862237') 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", "proposer_type", "proposer_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "biRLXaThfsxP3rp2zZeX"], ["email", "user@example.com"], ["proposable_type", "User"], ["proposer_type", "User"], ["proposer_id", 1], ["expires_at", "2019-07-05 00:32:25.861196"], ["updated_at", "2019-07-04 00:32:25.864284"], ["created_at", "2019-07-04 00:32:25.864284"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) 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.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (0.9ms) 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_not_return_proposal_action_invite +----------------------------------------------------------- + Proposal::Token Load (0.7ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:33:16.559339') 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 00:33:16.591590') 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.5ms) 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 00:33:16.595311') 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_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 00:33:16.599840') 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.9ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "jK2cY4TD5sUHczgas1aK"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2020-07-04 00:33:16.599308"], ["updated_at", "2019-07-04 00:33:16.600866"], ["created_at", "2019-07-04 00:33:16.600866"]] +  (0.1ms) 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 00:33:16.604749') 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_the_resource +--------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.6ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:33:16.613480"], ["updated_at", "2019-07-04 00:33:16.613480"]] +  (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 00:33:16.616006') 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.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 00:33:16.620398') 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_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 00:33:16.622989') 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 00:33:16.625665') 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.1ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_resource_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 00:33:16.635624"], ["updated_at", "2019-07-04 00:33:16.635624"]] +  (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 00:33:16.637678"], ["updated_at", "2019-07-04 00:33:16.637678"]] +  (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 00:33:16.638799') 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 00:33:16.641042') 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", "Z36VHjGwycTQw1fAKJFr"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:33:16.639905"], ["updated_at", "2019-07-04 00:33:16.642512"], ["created_at", "2019-07-04 00:33:16.642512"]] +  (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]] +  (1.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 00:33:16.649209') 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 00:33:16.651241') 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_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 00:33:16.653245') 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 00:33:16.655204') 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", "D8AFsqzhakhJU56LPsoc"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:33:16.654344"], ["updated_at", "2019-07-04 00:33:16.656445"], ["created_at", "2019-07-04 00:33:16.656445"]] +  (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.8ms) rollback transaction +  (0.1ms) 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 00:33:16.662677"], ["updated_at", "2019-07-04 00:33:16.662677"]] +  (0.2ms) 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 00:33:16.664872') 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 00:33:16.668040') 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", "zrCQpjswHac3sacqbtX1"], ["email", "user@example.com"], ["proposable_type", "User"], ["proposer_type", "User"], ["proposer_id", 1], ["expires_at", "2019-07-05 00:33:16.666368"], ["updated_at", "2019-07-04 00:33:16.669279"], ["created_at", "2019-07-04 00:33:16.669279"]] +  (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.6ms) 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 00:33:16.673363') 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 00:33:16.676136') 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", "arguments", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["token", "uPdM3Kqe7Bnq3FUzUM5a"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n:role: admin\n"], ["expires_at", "2019-07-05 00:33:16.674835"], ["updated_at", "2019-07-04 00:33:16.677339"], ["created_at", "2019-07-04 00:33:16.677339"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? AND "proposal_tokens"."token" = ? LIMIT ? [["proposable_type", "User"], ["token", "uPdM3Kqe7Bnq3FUzUM5a"], ["LIMIT", 1]] +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------- +ProposalTest: test_should_not_return_no_action_if_accepted +---------------------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:33:16.684856') 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 00:33:16.687235') 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", "jtfizRdsbHyzqFaCtskt"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:33:16.686195"], ["updated_at", "2019-07-04 00:33:16.688266"], ["created_at", "2019-07-04 00:33:16.688266"]] +  (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 00:33:16.690140"], ["accepted_at", "2019-07-04 00:33:16.690140"], ["id", 1]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_notify +----------------------------------------------------------- +  (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 00:33:16.695253"], ["updated_at", "2019-07-04 00:33:16.695253"]] +  (0.2ms) 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 00:33:16.697644') 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 00:33:16.699971') 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 00:33:16.702482') 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.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 00:33:16.705270') 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_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 00:33:16.710353') 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 00:33:16.712697') 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", "XjCrcMxy5rNAYzgi9Uxd"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:33:16.711663"], ["updated_at", "2019-07-04 00:33:16.713703"], ["created_at", "2019-07-04 00:33:16.713703"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (1.5ms) 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 (0.6ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:33:16.720124"], ["updated_at", "2019-07-04 00:33:16.720124"]] +  (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 00:33:16.722360"], ["updated_at", "2019-07-04 00:33:16.722360"]] +  (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 00:33:16.723637') 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.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:33:16.726733') 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", "ZksqHJbjnQ5maL2DtwZ6"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:33:16.724920"], ["updated_at", "2019-07-04 00:33:16.728692"], ["created_at", "2019-07-04 00:33:16.728692"]] +  (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 00:33:16.730516"], ["accepted_at", "2019-07-04 00:33:16.730516"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:33:16.731729') 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.4ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:33:16.736152') 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", "8pa9b486151h4zmNypKy"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:33:16.734271"], ["updated_at", "2019-07-04 00:33:16.737969"], ["created_at", "2019-07-04 00:33:16.737969"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) 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 00:33:16.741429') 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 00:33:16.744018') 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", "noU8wEA8pdxzvHbyQ6Zx"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:33:16.742851"], ["updated_at", "2019-07-04 00:33:16.744880"], ["created_at", "2019-07-04 00:33:16.744880"]] +  (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 00:33:16.746636"], ["accepted_at", "2019-07-04 00:33:16.746636"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) 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.4ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:33:16.749324"], ["updated_at", "2019-07-04 00:33:16.749324"]] +  (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 00:33:16.750704') 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 00:33:16.752347') 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", "ayiTEuXxYBXVzpSuX27T"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:33:16.751616"], ["updated_at", "2019-07-04 00:33:16.753070"], ["created_at", "2019-07-04 00:33:16.753070"]] +  (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 00:33:16.754157') 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_return_all_arguments +---------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:33:16.757169') 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 00:33:16.759543') 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", "W8fu73r1x9NgyaexAmfB"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n- admin\n- 1\n"], ["expires_at", "2019-07-05 00:33:16.758552"], ["updated_at", "2019-07-04 00:33:16.760694"], ["created_at", "2019-07-04 00:33:16.760694"]] +  (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", "W8fu73r1x9NgyaexAmfB"], ["LIMIT", 1]] +  (1.1ms) rollback transaction +  (0.2ms) 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 00:33:16.780975"], ["updated_at", "2019-07-04 00:33:16.780975"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + Project Create (0.3ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:33:16.783458"], ["updated_at", "2019-07-04 00:33:16.783458"]] +  (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 00:33:16.784943') 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_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 00:33:16.788114') 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 00:33:16.789900') 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_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 00:33:16.793217') 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 00:33:16.795754') 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", "2bVhsUcXWgGNWwypyJ5x"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:33:16.794598"], ["updated_at", "2019-07-04 00:33:16.797153"], ["created_at", "2019-07-04 00:33:16.797153"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.2ms) 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 00:33:16.801455') 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 00:33:16.803735') 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_truth +------------------------ +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_return_proposal_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 00:33:16.806938"], ["updated_at", "2019-07-04 00:33:16.806938"]] +  (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 00:33:16.808447') 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.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:33:16.812064') 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.7ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_respond_to_the_recipient +-------------------------------------------------- +  (0.3ms) 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 00:33:16.815958"], ["updated_at", "2019-07-04 00:33:16.815958"]] +  (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 00:33:16.818093') 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.5ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:33:16.822077"], ["updated_at", "2019-07-04 00:33:16.822077"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:33:16.823674') 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.4ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:33:16.828785') 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 (3.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "4pULeYaPisBaypjhCMos"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:33:16.825567"], ["updated_at", "2019-07-04 00:33:16.831119"], ["created_at", "2019-07-04 00:33:16.831119"]] +  (0.3ms) 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", "4pULeYaPisBaypjhCMos"], ["LIMIT", 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 00:33:16.841485"], ["accepted_at", "2019-07-04 00:33:16.841485"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) 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 00:33:16.844134') 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 00:33:16.846465') 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", "QapYFs5DnAU1ZeJjGYYs"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:33:16.845474"], ["updated_at", "2019-07-04 00:33:16.847342"], ["created_at", "2019-07-04 00:33:16.847342"]] +  (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 00:33:16.849133"], ["accepted_at", "2019-07-04 00:33:16.849133"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_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 00:33:16.851189') 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 00:33:16.852986') 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", "rpcvF1WHhXUtPniz23ZW"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:33:16.852162"], ["updated_at", "2019-07-04 00:33:16.853755"], ["created_at", "2019-07-04 00:33:16.853755"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) 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 00:33:16.857033"], ["updated_at", "2019-07-04 00:33:16.857033"]] +  (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 00:33:16.858512') 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 00:33:16.860471') 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", "Es5taaRB54W34sL92J7z"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:33:16.859632"], ["updated_at", "2019-07-04 00:33:16.861276"], ["created_at", "2019-07-04 00:33:16.861276"]] +  (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 00:33:16.863762') 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 00:33:16.867474"], ["reminded_at", "2019-07-04 00:33:16.867474"], ["id", 1]] +  (0.1ms) 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.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:33:16.870382') 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 00:33:16.872687') 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", "CMNknjmps6npAETZBzmv"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:33:16.871711"], ["updated_at", "2019-07-04 00:33:16.874077"], ["created_at", "2019-07-04 00:33:16.874077"]] +  (0.2ms) 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 00:33:16.876436') 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.2ms) 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_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 00:33:16.887546') 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 00:33:16.889646') 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_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 00:33:16.892072"], ["updated_at", "2019-07-04 00:33:16.892072"]] +  (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 00:33:16.893865') 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.5ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:33:16.896091') 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", "KDHzTQntHQGs7WZHsVyu"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:33:16.895022"], ["updated_at", "2019-07-04 00:33:16.898336"], ["created_at", "2019-07-04 00:33:16.898336"]] +  (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 00:33:16.901105"], ["updated_at", "2019-07-04 00:33:16.901105"]] +  (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 00:33:16.902661') 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 00:33:16.904860') 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", "GKjPSUHZV8NiFK1qrKpa"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["expires_at", "2019-07-05 00:33:16.903879"], ["updated_at", "2019-07-04 00:33:16.905872"], ["created_at", "2019-07-04 00:33:16.905872"]] +  (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 00:33:16.907148') 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.9ms) rollback transaction +  (0.2ms) 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 00:33:16.911234"], ["updated_at", "2019-07-04 00:33:16.911234"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:33:16.914052') 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.4ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:33:16.919732') 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", "xqNUAzz1YJptNQY1y5fK"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:33:16.917210"], ["updated_at", "2019-07-04 00:33:16.922189"], ["created_at", "2019-07-04 00:33:16.922189"]] +  (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 00:33:16.925671') 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 00:33:16.929071"], ["reminded_at", "2019-07-04 00:33:16.929071"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.0ms) rollback transaction +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (0.2ms) 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 + 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.3ms) 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 (1.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:40.567241') 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 00:34:40.636878') 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_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 00:34:40.649297"], ["updated_at", "2019-07-04 00:34:40.649297"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + User Create (2.0ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:34:40.656133"], ["updated_at", "2019-07-04 00:34:40.656133"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (1.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:40.663339') 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 00:34:40.671423') 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 (7.7ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "resource_type", "resource_id", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["token", "aMya27Xayv15zEdCMqSS"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:34:40.667673"], ["updated_at", "2019-07-04 00:34:40.672718"], ["created_at", "2019-07-04 00:34:40.672718"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.3ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 00:34:40.687192"], ["accepted_at", "2019-07-04 00:34:40.687192"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (1.0ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:40.689132') 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 00:34:40.692518') 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", "9WUzv8HBbQnEp7zopynU"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:34:40.691291"], ["updated_at", "2019-07-04 00:34:40.694019"], ["created_at", "2019-07-04 00:34:40.694019"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.4ms) 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 00:34:40.697155') 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_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 00:34:40.701322"], ["updated_at", "2019-07-04 00:34:40.701322"]] +  (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 00:34:40.716886') 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 00:34:40.721887') 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", "8DmTQ9ggNvpB6Mn9Fysz"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:34:40.720558"], ["updated_at", "2019-07-04 00:34:40.723473"], ["created_at", "2019-07-04 00:34:40.723473"]] +  (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 00:34:40.725131"], ["updated_at", "2019-07-04 00:34:40.725131"]] +  (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 00:34:40.725885') 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 00:34:40.729501') 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", "jxEjF18ivANpTmkSE8pp"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 2], ["expires_at", "2019-07-05 00:34:40.728423"], ["updated_at", "2019-07-04 00:34:40.731316"], ["created_at", "2019-07-04 00:34:40.731316"]] +  (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 00:34:40.733218') 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.7ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_notify +----------------------------------------------------------- +  (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 00:34:40.742029"], ["updated_at", "2019-07-04 00:34:40.742029"]] +  (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 00:34:40.743613') 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 00:34:40.745009') 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 00:34:40.746885') 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.2ms) begin transaction +---------------------------------------------------------------- +ProposalTest: test_should_return_proposals_for_resource_instance +---------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (1.0ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:34:40.749790"], ["updated_at", "2019-07-04 00:34:40.749790"]] +  (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 00:34:40.752283"], ["updated_at", "2019-07-04 00:34:40.752283"]] +  (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 00:34:40.753361') 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 00:34:40.754982') 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", "f69yegaswFmbDs6bwbK7"], ["email", "user@example.com"], ["proposable_type", "User"], ["resource_type", "Project"], ["resource_id", 1], ["expires_at", "2019-07-05 00:34:40.754257"], ["updated_at", "2019-07-04 00:34:40.756458"], ["created_at", "2019-07-04 00:34:40.756458"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.8ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."resource_type" = ? AND "proposal_tokens"."resource_id" = ? [["resource_type", "Project"], ["resource_id", 1]] +  (0.9ms) rollback transaction +  (0.1ms) 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 00:34:40.772052"], ["updated_at", "2019-07-04 00:34:40.772052"]] +  (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 00:34:40.773229') 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 00:34:40.784549') 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 (17.2ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "nAJ6fmuaK8RgCd93FYsD"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:34:40.782819"], ["updated_at", "2019-07-04 00:34:40.785850"], ["created_at", "2019-07-04 00:34:40.785850"]] +  (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", "nAJ6fmuaK8RgCd93FYsD"], ["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 00:34:40.808897"], ["accepted_at", "2019-07-04 00:34:40.808897"], ["id", 1]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) 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 00:34:40.811447') 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]] +  (1.8ms) 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 00:34:40.815541') 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", "aAxtmrdT2eMJ2N4q1P1x"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:34:40.812623"], ["updated_at", "2019-07-04 00:34:40.819881"], ["created_at", "2019-07-04 00:34:40.819881"]] +  (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 00:34:40.822245"], ["accepted_at", "2019-07-04 00:34:40.822245"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.0ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------- +ProposalTest: test_should_set_reminded_bang +------------------------------------------- +  (0.2ms) 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 00:34:40.826275"], ["updated_at", "2019-07-04 00:34:40.826275"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (1.1ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:40.828054') 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]] +  (1.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 00:34:40.833237') 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", "MYrjZ1MHVfV64qswU4EQ"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:34:40.830238"], ["updated_at", "2019-07-04 00:34:40.834501"], ["created_at", "2019-07-04 00:34:40.834501"]] +  (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 00:34:40.836554') 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 00:34:40.840692"], ["reminded_at", "2019-07-04 00:34:40.840692"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) 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 00:34:40.845256"], ["updated_at", "2019-07-04 00:34:40.845256"]] +  (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 00:34:40.847285') 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.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:40.851059') 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.7ms) 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 00:34:40.854346') 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 00:34:40.857457') 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", "QRBHevHgbLkCqrqJrDyq"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:34:40.855766"], ["updated_at", "2019-07-04 00:34:40.859246"], ["created_at", "2019-07-04 00:34:40.859246"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +-------------------------------------------------- +ProposalTest: test_should_respond_to_the_recipient +-------------------------------------------------- +  (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 00:34:40.865912"], ["updated_at", "2019-07-04 00:34:40.865912"]] +  (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 00:34:40.867913') 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.8ms) 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 00:34:40.872237') 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 (1.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:40.874779') 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_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 00:34:40.882350"], ["updated_at", "2019-07-04 00:34:40.882350"]] +  (0.4ms) 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 00:34:40.884670') 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 00:34:40.887444') 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", "qrmDWwSH6JoFfEZoNuy9"], ["email", "user@example.com"], ["proposable_type", "User"], ["proposer_type", "User"], ["proposer_id", 1], ["expires_at", "2019-07-05 00:34:40.886058"], ["updated_at", "2019-07-04 00:34:40.888723"], ["created_at", "2019-07-04 00:34:40.888723"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposer_type" = ? AND "proposal_tokens"."proposer_id" = ? [["proposer_type", "User"], ["proposer_id", 1]] +  (1.2ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------------------ +ProposalTest: test_should_return_hash_when_arguments_is_hash +------------------------------------------------------------ + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:40.895368') 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 00:34:40.899750') 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", "UyBNtTmj3TjP4xascSt6"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n:role: admin\n"], ["expires_at", "2019-07-05 00:34:40.898050"], ["updated_at", "2019-07-04 00:34:40.901173"], ["created_at", "2019-07-04 00:34:40.901173"]] +  (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", "UyBNtTmj3TjP4xascSt6"], ["LIMIT", 1]] +  (4.8ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------------ +ProposalTest: test_should_have_action_remind_for_invite_(new_user) +------------------------------------------------------------------ + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:40.916411') 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 00:34:40.920104') 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", "WqtsTBD9HDJ8YLFkULSr"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:34:40.918674"], ["updated_at", "2019-07-04 00:34:40.958749"], ["created_at", "2019-07-04 00:34:40.958749"]] +  (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 00:34:40.961172') 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]] + 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.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.7ms) 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 00:34:40.970236') 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 (5.7ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:40.972903') 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", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "PtZqPmu1CAYe7w6aYbFe"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:34:40.972076"], ["updated_at", "2019-07-04 00:34:40.979525"], ["created_at", "2019-07-04 00:34:40.979525"]] +  (2.0ms) 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 00:34:40.984702"], ["accepted_at", "2019-07-04 00:34:40.984702"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------- +ProposalTest: test_should_respond_to_the_resource +------------------------------------------------- +  (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 00:34:40.989844"], ["updated_at", "2019-07-04 00:34:40.989844"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + Project Create (0.2ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:34:40.999617"], ["updated_at", "2019-07-04 00:34:40.999617"]] +  (0.2ms) 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 00:34:41.002000') 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]] +  (1.0ms) rollback transaction +  (0.2ms) begin transaction +----------------------------------------------------------------------- +ProposalTest: test_should_have_action_remind_for_notify_(existing_user) +----------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (1.3ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:34:41.013351"], ["updated_at", "2019-07-04 00:34:41.013351"]] +  (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 00:34:41.015950') 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 00:34:41.019628') 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", "ywgWWXc8pSMjNHvSKvz2"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:34:41.017518"], ["updated_at", "2019-07-04 00:34:41.021169"], ["created_at", "2019-07-04 00:34:41.021169"]] +  (1.2ms) 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 00:34:41.024624') 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.4ms) 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.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:41.035654') 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", "W77635ELZsBPvcCzzhgM"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2020-07-04 00:34:41.035103"], ["updated_at", "2019-07-04 00:34:41.036999"], ["created_at", "2019-07-04 00:34:41.036999"]] +  (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 00:34:41.039779') 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 +  (1.1ms) rollback transaction +  (0.2ms) begin transaction +---------------------------------------------- +ProposalTest: test_should_return_all_arguments +---------------------------------------------- + Proposal::Token Load (0.4ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:41.048451') 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 00:34:41.051074') 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", "wsBoreFk5jWcq7EUce2z"], ["email", "user@example.com"], ["proposable_type", "User"], ["arguments", "---\n- admin\n- 1\n"], ["expires_at", "2019-07-05 00:34:41.049966"], ["updated_at", "2019-07-04 00:34:41.051893"], ["created_at", "2019-07-04 00:34:41.051893"]] +  (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", "wsBoreFk5jWcq7EUce2z"], ["LIMIT", 1]] +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------- +ProposalTest: test_should_not_return_proposal_action_invite +----------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:41.056183') 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 (1.2ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:41.070779') 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.3ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:41.079709') 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_truth +------------------------ +  (0.0ms) 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 00:34:41.088141') 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 00:34:41.089880') 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_set_reminded_safe +------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + User Create (0.8ms) INSERT INTO "users" ("email", "created_at", "updated_at") VALUES (?, ?, ?) [["email", "user@example.com"], ["created_at", "2019-07-04 00:34:41.092175"], ["updated_at", "2019-07-04 00:34:41.092175"]] +  (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 00:34:41.094288') 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 00:34:41.099067') 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", "AF3NzVdW7FwCwGZmnrj5"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:34:41.097532"], ["updated_at", "2019-07-04 00:34:41.100317"], ["created_at", "2019-07-04 00:34:41.100317"]] +  (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 00:34:41.103472') 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 00:34:41.106215"], ["reminded_at", "2019-07-04 00:34:41.106215"], ["id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.1ms) rollback transaction +  (0.2ms) begin transaction +--------------------------------------------- +ProposalTest: test_should_return_the_resource +--------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Project Create (0.7ms) INSERT INTO "projects" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-07-04 00:34:41.111770"], ["updated_at", "2019-07-04 00:34:41.111770"]] +  (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 00:34:41.114011') 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_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 00:34:41.119261') 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_validate_arguments_with_symbols +--------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:41.123340') 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.128603') 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_all_proposals_for_type +------------------------------------------------------- + Proposal::Token Load (0.5ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:41.133402') 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.4ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:41.137059') 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", "MxsmsNypSxbYmxaQgWyf"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:34:41.135380"], ["updated_at", "2019-07-04 00:34:41.138731"], ["created_at", "2019-07-04 00:34:41.138731"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + Proposal::Token Load (0.3ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE "proposal_tokens"."proposable_type" = ? [["proposable_type", "User"]] +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------- +ProposalTest: test_should_create_valid_proposal_token +----------------------------------------------------- + Proposal::Token Load (0.8ms) SELECT "proposal_tokens".* FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:41.149381') 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.4ms) SELECT 1 AS one FROM "proposal_tokens" WHERE (accepted_at IS NULL) AND (expires_at > '2019-07-04 00:34:41.153097') 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", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "mWFa9HT8tKRC6y58FF76"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:34:41.151512"], ["updated_at", "2019-07-04 00:34:41.154391"], ["created_at", "2019-07-04 00:34:41.154391"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.1ms) 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 00:34:41.161489') 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.6ms) 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 00:34:41.166051') 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", "sgyLmxTenNRG91WL3yKo"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:34:41.163291"], ["updated_at", "2019-07-04 00:34:41.167603"], ["created_at", "2019-07-04 00:34:41.167603"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Proposal::Token Update (0.4ms) UPDATE "proposal_tokens" SET "updated_at" = ?, "accepted_at" = ? WHERE "proposal_tokens"."id" = ? [["updated_at", "2019-07-04 00:34:41.170537"], ["accepted_at", "2019-07-04 00:34:41.170537"], ["id", 1]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (1.4ms) rollback transaction +  (0.2ms) 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 00:34:41.176201') 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 00:34:41.179664') 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 (2.4ms) INSERT INTO "proposal_tokens" ("token", "email", "proposable_type", "expires_at", "updated_at", "created_at") VALUES (?, ?, ?, ?, ?, ?) [["token", "gzowRVRpqH52pHrztQhe"], ["email", "user@example.com"], ["proposable_type", "User"], ["expires_at", "2019-07-05 00:34:41.178324"], ["updated_at", "2019-07-04 00:34:41.181612"], ["created_at", "2019-07-04 00:34:41.181612"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------- +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