rails-identity 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20a837da53ec0416b2aed1c6566d6dbf0dda52fa
4
- data.tar.gz: 0855e201cedceeface888f5b6ac0fbdf9e1b7f86
3
+ metadata.gz: 2692ca2c92fa8c70baf0faa085230d26c8e0a7d6
4
+ data.tar.gz: ff025713fa3bf222d33e0eeb2ed4aa989f2d01c1
5
5
  SHA512:
6
- metadata.gz: e3a2d69afe15f9eaaa2cc207c11203a8a1e63b8ef7b5392ed5262f8837fa74692f2aa8e77815a747474ccdf7a7eb2637b1d426995d05af3578d61654ac3cd177
7
- data.tar.gz: b80876a48f174fa2c6c702900cf1b8e863d8def5b0445d23b8a5323a1b510137f6fe9db416d86d62f8bc578615ca6b7f53974169724966d1a33111b0595056ce
6
+ metadata.gz: 56baf3620f1a4f7f5b87d02330ff4f5632d3ab6e6fc0413a689e4ba2b3c5dc1d105667c6bf42dde812031c6909445e7e23dca6c16c4f90f9692d4987814450f7
7
+ data.tar.gz: 2964fe6dc4ef5a9af01da9a0295b102b7e1f0c0964b33357a624e4bdfbc90e24f621ae19a6db18a167debc9529a18dcd8f8f15e78acd5ef5323b60dab8c387b1
@@ -1,3 +1,3 @@
1
1
  module RailsIdentity
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
Binary file
@@ -322029,3 +322029,1777 @@ RailsIdentity::SessionTest: test_save_a_session
322029
322029
  RailsIdentity::SessionTest: test_cannot_save_a_session_without_a_user
322030
322030
  ---------------------------------------------------------------------
322031
322031
   (0.0ms) rollback transaction
322032
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
322033
+  (0.1ms) begin transaction
322034
+ Fixture Delete (0.3ms) DELETE FROM "rails_identity_sessions"
322035
+ Fixture Insert (0.1ms) INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('1', '1', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA', 'secret', '2016-04-16 04:24:39', '2016-04-16 04:24:39')
322036
+ Fixture Insert (0.0ms) INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('2', '2', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIyIiwidXNlcl91dWlkIjoiMiIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.FbDmc7IzVSQmdKeK7cO-TIAYTU2l1shIwnGghOh55kY', 'secret', '2016-04-16 04:24:39', '2016-04-16 04:24:39')
322037
+ Fixture Insert (0.0ms) INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('session_admin_one', 'admin_one', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYwODMxMDc4fQ.CSDumaIQ9SroeW6Gs3tjyvRV5BkKB5uQMiGq7ObGRSk', 'secret', '2016-04-16 04:24:39', '2016-04-16 04:24:39')
322038
+ Fixture Delete (0.1ms) DELETE FROM "rails_identity_users"
322039
+ Fixture Insert (0.1ms) INSERT INTO "rails_identity_users" ("uuid", "username", "password_digest", "role", "verified", "created_at", "updated_at") VALUES ('1', 'one@example.com', '$2a$10$VITEkRHFe8telBZ6vCxa7ujte5Y0lOLPDuEyj6RVhyVcTY.BGewxy', 10, 't', '2016-04-16 04:24:39', '2016-04-16 04:24:39')
322040
+ Fixture Insert (0.1ms) INSERT INTO "rails_identity_users" ("uuid", "username", "password_digest", "role", "verified", "created_at", "updated_at") VALUES ('2', 'two@example.com', '$2a$10$pASxTRAGXlMuE493kIWfX.LaTLPXdE8ehjx2hKdp3M6QCqXClL.AO', 10, 't', '2016-04-16 04:24:39', '2016-04-16 04:24:39')
322041
+ Fixture Insert (0.0ms) INSERT INTO "rails_identity_users" ("uuid", "username", "password_digest", "role", "verified", "created_at", "updated_at") VALUES ('admin_one', 'admin_one@example.com', '$2a$10$Hr0QW2X328jLo5jE6SeHHONgt9fseSm31U/m0LdZpjTUueKZEyaQm', 100, 't', '2016-04-16 04:24:39', '2016-04-16 04:24:39')
322042
+  (1.4ms) commit transaction
322043
+  (0.1ms) begin transaction
322044
+ -----------------------------------------------------------------
322045
+ RailsIdentity::UserTest: test_user_can_issue_a_verification_token
322046
+ -----------------------------------------------------------------
322047
+  (0.1ms) SAVEPOINT active_record_1
322048
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
322049
+ SQL (0.4ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$39aY42MmXbf8jZA/Oc3Q9.zDmK/sQhUqMamJ/boTrE6jUVDacA846"], ["role", 10], ["created_at", "2016-04-16 04:24:39.041953"], ["updated_at", "2016-04-16 04:24:39.041953"], ["uuid", "22320a80-038b-11e6-885f-6c4008a6fa2a"]]
322050
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322051
+  (0.1ms) SAVEPOINT active_record_1
322052
+ SQL (0.3ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "22320a80-038b-11e6-885f-6c4008a6fa2a"], ["uuid", "2239e9a8-038b-11e6-885f-6c4008a6fa2a"], ["secret", "0c2c6684-81c6-4a62-bbb2-e48aee3b6480"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMjMyMGE4MC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMjM5ZTlhOC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjc5LCJleHAiOjE0NjA3ODQyNzl9.lv3d3sq_yyTV1VdtkH0ZdlkuLVvnglzX7xq4kr2cvW8"], ["created_at", "2016-04-16 04:24:39.094928"], ["updated_at", "2016-04-16 04:24:39.094928"]]
322053
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322054
+  (0.9ms) rollback transaction
322055
+  (0.0ms) begin transaction
322056
+ ----------------------------------------------------------------------
322057
+ RailsIdentity::UserTest: test_user_is_valid_with_username_and_password
322058
+ ----------------------------------------------------------------------
322059
+  (0.0ms) SAVEPOINT active_record_1
322060
+ RailsIdentity::User Exists (0.2ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
322061
+ SQL (0.2ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$2X2.UpWfypoD.mblwNIqIuInTUIOSRuuy9udHXwoUmN/mx5gM3eP2"], ["role", 10], ["created_at", "2016-04-16 04:24:39.101469"], ["updated_at", "2016-04-16 04:24:39.101469"], ["uuid", "223b2002-038b-11e6-885f-6c4008a6fa2a"]]
322062
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322063
+  (0.4ms) rollback transaction
322064
+  (0.1ms) begin transaction
322065
+ --------------------------------------------------------------------------
322066
+ RailsIdentity::UserTest: test_user_is_not_valid_if_username_already_exists
322067
+ --------------------------------------------------------------------------
322068
+  (0.0ms) SAVEPOINT active_record_1
322069
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
322070
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
322071
+  (0.0ms) rollback transaction
322072
+  (0.0ms) begin transaction
322073
+ ------------------------------------------------------------------
322074
+ RailsIdentity::UserTest: test_user_is_not_valid_without_a_password
322075
+ ------------------------------------------------------------------
322076
+  (0.0ms) SAVEPOINT active_record_1
322077
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
322078
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
322079
+  (0.0ms) rollback transaction
322080
+  (0.1ms) begin transaction
322081
+ ---------------------------------------------------------------
322082
+ RailsIdentity::UserTest: test_user_has_a_role_of_100_by_default
322083
+ ---------------------------------------------------------------
322084
+  (0.0ms) SAVEPOINT active_record_1
322085
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'new@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
322086
+ SQL (0.2ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "new@example.com"], ["password_digest", "$2a$04$AiWDrkOSwpc0tMf8pFkm8.LzPR2oyXwNEzq2zvqVrfL6B6GoAN3pi"], ["role", 10], ["created_at", "2016-04-16 04:24:39.115287"], ["updated_at", "2016-04-16 04:24:39.115287"], ["uuid", "223d398c-038b-11e6-885f-6c4008a6fa2a"]]
322087
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322088
+  (0.4ms) rollback transaction
322089
+  (0.0ms) begin transaction
322090
+ ---------------------------------------------------------------------------
322091
+ RailsIdentity::UserTest: test_user_is_not_valid_if_username_is_malformatted
322092
+ ---------------------------------------------------------------------------
322093
+  (0.0ms) SAVEPOINT active_record_1
322094
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
322095
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
322096
+  (0.0ms) rollback transaction
322097
+  (0.1ms) begin transaction
322098
+ ------------------------------------------------------------------
322099
+ RailsIdentity::UserTest: test_user_is_not_valid_without_a_username
322100
+ ------------------------------------------------------------------
322101
+  (0.0ms) SAVEPOINT active_record_1
322102
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" IS NULL AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
322103
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
322104
+  (0.0ms) rollback transaction
322105
+  (0.1ms) begin transaction
322106
+ ----------------------------------------------------------
322107
+ RailsIdentity::UserTest: test_user_can_issue_a_reset_token
322108
+ ----------------------------------------------------------
322109
+  (0.0ms) SAVEPOINT active_record_1
322110
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
322111
+ SQL (0.1ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$0nBKRAuwJ08ULtoiaKD.KeiPmJQ4ArlwONMQmsRWI89yugY0NLPEi"], ["role", 10], ["created_at", "2016-04-16 04:24:39.125122"], ["updated_at", "2016-04-16 04:24:39.125122"], ["uuid", "223eb956-038b-11e6-885f-6c4008a6fa2a"]]
322112
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322113
+  (0.0ms) SAVEPOINT active_record_1
322114
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "223eb956-038b-11e6-885f-6c4008a6fa2a"], ["uuid", "223ee1ec-038b-11e6-885f-6c4008a6fa2a"], ["secret", "618de48b-bf8b-421a-a8f3-99650ffdad44"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMjNlYjk1Ni0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMjNlZTFlYy0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjc5LCJleHAiOjE0NjA3ODQyNzl9.-32voUPf7tG6OYfo6AygPupYsjoxxi09E2fyWEb0bbk"], ["created_at", "2016-04-16 04:24:39.127098"], ["updated_at", "2016-04-16 04:24:39.127098"]]
322115
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322116
+  (0.6ms) rollback transaction
322117
+  (0.0ms) begin transaction
322118
+ ------------------------------------------------------------
322119
+ RailsIdentity::SessionsControllerTest: test_create_a_session
322120
+ ------------------------------------------------------------
322121
+ RailsIdentity::Session Load (0.2ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322122
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322123
+ Processing by RailsIdentity::SessionsController#create as HTML
322124
+ Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
322125
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
322126
+  (0.1ms) SAVEPOINT active_record_1
322127
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "225400b8-038b-11e6-885f-6c4008a6fa2a"], ["secret", "2f40d519-4186-4351-a5a6-fd09b651d348"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjI1NDAwYjgtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY3OSwiZXhwIjoxNDYxOTkwMjc5fQ.ZU20OM46a9ZvRj8WS3jaJLjuGUPgVaF0Q3YhoJSNGDI"], ["created_at", "2016-04-16 04:24:39.265588"], ["updated_at", "2016-04-16 04:24:39.265588"]]
322128
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322129
+ Completed 201 Created in 65ms (Views: 0.4ms | ActiveRecord: 0.4ms)
322130
+  (1.2ms) rollback transaction
322131
+  (0.1ms) begin transaction
322132
+ ----------------------------------------------------------------------
322133
+ RailsIdentity::SessionsControllerTest: test_public_cannot_show_session
322134
+ ----------------------------------------------------------------------
322135
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322136
+ Processing by RailsIdentity::SessionsController#show as HTML
322137
+ Parameters: {"id"=>"1"}
322138
+ Requires a token
322139
+ Token decode error: Nil JSON web token
322140
+ Invalid token:
322141
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
322142
+  (0.1ms) rollback transaction
322143
+  (0.1ms) begin transaction
322144
+ --------------------------------------------------------------------------
322145
+ RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions
322146
+ --------------------------------------------------------------------------
322147
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322148
+ Processing by RailsIdentity::SessionsController#index as HTML
322149
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA"}
322150
+ Requires a token
322151
+ Token well formatted for user 1,
322152
+ session 1
322153
+ Cache miss. Try database.
322154
+ RailsIdentity::User Load (0.2ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322155
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322156
+ Token well formatted and verified. Set cache.
322157
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322158
+ Attempting to get user
322159
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
322160
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [8a641147-7697-46f6-b1b1-198726ad6260] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
322161
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [8a641147-7697-46f6-b1b1-198726ad6260] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 0.11ms
322162
+ [ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 8a641147-7697-46f6-b1b1-198726ad6260) to Inline(default)
322163
+ Completed 200 OK in 17ms (Views: 1.0ms | ActiveRecord: 0.3ms)
322164
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322165
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
322166
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322167
+  (0.1ms) rollback transaction
322168
+  (0.0ms) begin transaction
322169
+ --------------------------------------------------------------------------------------
322170
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_a_password
322171
+ --------------------------------------------------------------------------------------
322172
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322173
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322174
+ Processing by RailsIdentity::SessionsController#create as HTML
322175
+ Parameters: {"username"=>"one@example.com"}
322176
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
322177
+ Attempting to get user
322178
+ Completed 401 Unauthorized in 66ms (Views: 0.3ms | ActiveRecord: 0.1ms)
322179
+  (0.1ms) rollback transaction
322180
+  (0.0ms) begin transaction
322181
+ ----------------------------------------------------------------------------
322182
+ RailsIdentity::SessionsControllerTest: test_admin_can_delete_other's_session
322183
+ ----------------------------------------------------------------------------
322184
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322185
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
322186
+ Processing by RailsIdentity::SessionsController#destroy as HTML
322187
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYwODMxMDc4fQ.CSDumaIQ9SroeW6Gs3tjyvRV5BkKB5uQMiGq7ObGRSk", "id"=>"1"}
322188
+ Requires a token
322189
+ Token well formatted for user admin_one,
322190
+ session session_admin_one
322191
+ Cache miss. Try database.
322192
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
322193
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
322194
+ Token well formatted and verified. Set cache.
322195
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
322196
+ Attempting to get RailsIdentity::Session 1
322197
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322198
+ Checking to see if authorized to access object
322199
+  (0.1ms) SAVEPOINT active_record_1
322200
+ SQL (0.2ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
322201
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322202
+ Rendered text template (0.0ms)
322203
+ Completed 204 No Content in 9ms (Views: 4.4ms | ActiveRecord: 0.4ms)
322204
+  (0.5ms) rollback transaction
322205
+  (0.1ms) begin transaction
322206
+ ------------------------------------------------------------------
322207
+ RailsIdentity::SessionsControllerTest: test_show_a_current_session
322208
+ ------------------------------------------------------------------
322209
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322210
+ Processing by RailsIdentity::SessionsController#show as HTML
322211
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"current"}
322212
+ Requires a token
322213
+ Token well formatted for user 1,
322214
+ session 1
322215
+ Cache miss. Try database.
322216
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322217
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322218
+ Token well formatted and verified. Set cache.
322219
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322220
+ Attempting to get RailsIdentity::Session 1
322221
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322222
+ Checking to see if authorized to access object
322223
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322224
+ Completed 200 OK in 7ms (Views: 0.5ms | ActiveRecord: 0.3ms)
322225
+  (0.1ms) rollback transaction
322226
+  (0.0ms) begin transaction
322227
+ --------------------------------------------------------------------
322228
+ RailsIdentity::SessionsControllerTest: test_delete_a_current_session
322229
+ --------------------------------------------------------------------
322230
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322231
+ Processing by RailsIdentity::SessionsController#destroy as HTML
322232
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"current"}
322233
+ Requires a token
322234
+ Token well formatted for user 1,
322235
+ session 1
322236
+ Cache miss. Try database.
322237
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322238
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322239
+ Token well formatted and verified. Set cache.
322240
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322241
+ Attempting to get RailsIdentity::Session 1
322242
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322243
+ Checking to see if authorized to access object
322244
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322245
+  (0.1ms) SAVEPOINT active_record_1
322246
+ SQL (0.2ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
322247
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322248
+ Rendered text template (0.0ms)
322249
+ Completed 204 No Content in 7ms (Views: 0.4ms | ActiveRecord: 0.6ms)
322250
+  (0.4ms) rollback transaction
322251
+  (0.0ms) begin transaction
322252
+ -----------------------------------------------------------------------------------
322253
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_if_not_verified
322254
+ -----------------------------------------------------------------------------------
322255
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322256
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322257
+  (0.0ms) SAVEPOINT active_record_1
322258
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
322259
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "verified" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verified", "f"], ["updated_at", "2016-04-16 04:24:39.414579"], ["uuid", "1"]]
322260
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322261
+ Processing by RailsIdentity::SessionsController#create as HTML
322262
+ Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
322263
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
322264
+ RailsIdentity::Errors::UnauthorizedError
322265
+ Completed 401 Unauthorized in 66ms (Views: 0.2ms | ActiveRecord: 0.0ms)
322266
+  (0.4ms) rollback transaction
322267
+  (0.0ms) begin transaction
322268
+ -----------------------------------------------------------------------------
322269
+ RailsIdentity::SessionsControllerTest: test_cannot_show_a_nonexisting_session
322270
+ -----------------------------------------------------------------------------
322271
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322272
+ Processing by RailsIdentity::SessionsController#show as HTML
322273
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"999"}
322274
+ Requires a token
322275
+ Token well formatted for user 1,
322276
+ session 1
322277
+ Cache miss. Try database.
322278
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322279
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322280
+ Token well formatted and verified. Set cache.
322281
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322282
+ Attempting to get RailsIdentity::Session 999
322283
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "999"]]
322284
+ RailsIdentity::Session 999 cannot be found
322285
+ Completed 404 Not Found in 6ms (Views: 0.3ms | ActiveRecord: 0.3ms)
322286
+  (0.1ms) rollback transaction
322287
+  (0.0ms) begin transaction
322288
+ ------------------------------------------------------------------------------------
322289
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_username
322290
+ ------------------------------------------------------------------------------------
322291
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322292
+ Processing by RailsIdentity::SessionsController#create as HTML
322293
+ Parameters: {"password"=>"[FILTERED]"}
322294
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" IS NULL LIMIT 1
322295
+ Attempting to get user
322296
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
322297
+  (0.1ms) rollback transaction
322298
+  (0.0ms) begin transaction
322299
+ -----------------------------------------------------------------------
322300
+ RailsIdentity::SessionsControllerTest: test_cannot_show_expired_session
322301
+ -----------------------------------------------------------------------
322302
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322303
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322304
+  (0.0ms) SAVEPOINT active_record_1
322305
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "2278a120-038b-11e6-885f-6c4008a6fa2a"], ["secret", "8b3aaa5f-2699-4b1c-9005-fac755e19e86"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjI3OGExMjAtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY3OSwiZXhwIjoxNDYwNzgwNjc4fQ.3ebv4RfEUtqJKaKjs3SBBGEb-rSMDoTg2e_F3iW47vI"], ["created_at", "2016-04-16 04:24:39.505554"], ["updated_at", "2016-04-16 04:24:39.505554"]]
322306
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322307
+ Processing by RailsIdentity::SessionsController#show as HTML
322308
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"2278a120-038b-11e6-885f-6c4008a6fa2a"}
322309
+ Requires a token
322310
+ Token well formatted for user 1,
322311
+ session 1
322312
+ Cache miss. Try database.
322313
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322314
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322315
+ Token well formatted and verified. Set cache.
322316
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322317
+ Attempting to get RailsIdentity::Session 2278a120-038b-11e6-885f-6c4008a6fa2a
322318
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2278a120-038b-11e6-885f-6c4008a6fa2a"]]
322319
+ Checking to see if authorized to access object
322320
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322321
+  (0.1ms) SAVEPOINT active_record_1
322322
+ SQL (0.2ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "2278a120-038b-11e6-885f-6c4008a6fa2a"]]
322323
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322324
+ RailsIdentity::Errors::ObjectNotFoundError
322325
+ Completed 404 Not Found in 8ms (Views: 0.2ms | ActiveRecord: 0.6ms)
322326
+  (0.7ms) rollback transaction
322327
+  (0.1ms) begin transaction
322328
+ --------------------------------------------------------------------------------
322329
+ RailsIdentity::SessionsControllerTest: test_cannot_delete_a_non-existent_session
322330
+ --------------------------------------------------------------------------------
322331
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322332
+ Processing by RailsIdentity::SessionsController#destroy as HTML
322333
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"999"}
322334
+ Requires a token
322335
+ Token well formatted for user 1,
322336
+ session 1
322337
+ Cache miss. Try database.
322338
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322339
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322340
+ Token well formatted and verified. Set cache.
322341
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322342
+ Attempting to get RailsIdentity::Session 999
322343
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "999"]]
322344
+ RailsIdentity::Session 999 cannot be found
322345
+ Completed 404 Not Found in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
322346
+  (0.1ms) rollback transaction
322347
+  (0.0ms) begin transaction
322348
+ --------------------------------------------------------------------------
322349
+ RailsIdentity::SessionsControllerTest: test_admin_can_show_other's_session
322350
+ --------------------------------------------------------------------------
322351
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322352
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
322353
+ Processing by RailsIdentity::SessionsController#show as HTML
322354
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYwODMxMDc4fQ.CSDumaIQ9SroeW6Gs3tjyvRV5BkKB5uQMiGq7ObGRSk", "id"=>"1"}
322355
+ Requires a token
322356
+ Token well formatted for user admin_one,
322357
+ session session_admin_one
322358
+ Cache miss. Try database.
322359
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
322360
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
322361
+ Token well formatted and verified. Set cache.
322362
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
322363
+ Attempting to get RailsIdentity::Session 1
322364
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322365
+ Checking to see if authorized to access object
322366
+ Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
322367
+  (0.1ms) rollback transaction
322368
+  (0.0ms) begin transaction
322369
+ -------------------------------------------------------------------------
322370
+ RailsIdentity::SessionsControllerTest: test_public_cannot_create_sessions
322371
+ -------------------------------------------------------------------------
322372
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322373
+ Processing by RailsIdentity::SessionsController#index as HTML
322374
+ Requires a token
322375
+ Token decode error: Nil JSON web token
322376
+ Invalid token:
322377
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
322378
+  (0.1ms) rollback transaction
322379
+  (0.0ms) begin transaction
322380
+ -------------------------------------------------------------------------
322381
+ RailsIdentity::SessionsControllerTest: test_cannot_delete_other's_session
322382
+ -------------------------------------------------------------------------
322383
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322384
+ Processing by RailsIdentity::SessionsController#destroy as HTML
322385
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"2"}
322386
+ Requires a token
322387
+ Token well formatted for user 1,
322388
+ session 1
322389
+ Cache miss. Try database.
322390
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322391
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322392
+ Token well formatted and verified. Set cache.
322393
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322394
+ Attempting to get RailsIdentity::Session 2
322395
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2"]]
322396
+ Checking to see if authorized to access object
322397
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
322398
+ RailsIdentity::Errors::UnauthorizedError
322399
+ Completed 401 Unauthorized in 6ms (Views: 0.2ms | ActiveRecord: 0.2ms)
322400
+  (0.1ms) rollback transaction
322401
+  (0.0ms) begin transaction
322402
+ ----------------------------------------------------------
322403
+ RailsIdentity::SessionsControllerTest: test_show_a_session
322404
+ ----------------------------------------------------------
322405
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322406
+ Processing by RailsIdentity::SessionsController#show as HTML
322407
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
322408
+ Requires a token
322409
+ Token well formatted for user 1,
322410
+ session 1
322411
+ Cache miss. Try database.
322412
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322413
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322414
+ Token well formatted and verified. Set cache.
322415
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322416
+ Attempting to get RailsIdentity::Session 1
322417
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322418
+ Checking to see if authorized to access object
322419
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322420
+ Completed 200 OK in 38ms (Views: 0.6ms | ActiveRecord: 0.2ms)
322421
+  (0.1ms) rollback transaction
322422
+  (0.0ms) begin transaction
322423
+ ----------------------------------------------------------------------------
322424
+ RailsIdentity::SessionsControllerTest: test_user_cannot_list_expired_session
322425
+ ----------------------------------------------------------------------------
322426
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322427
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322428
+  (0.0ms) SAVEPOINT active_record_1
322429
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "2286ce94-038b-11e6-885f-6c4008a6fa2a"], ["secret", "a0e0cfae-d6de-46ae-bc87-966e85367654"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjI4NmNlOTQtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY3OSwiZXhwIjoxNDYwNzgwNjc4fQ.NMsntvJHQgc8-syKYAMlrYmpFPWO-fBX9x2JJwtlBWs"], ["created_at", "2016-04-16 04:24:39.598580"], ["updated_at", "2016-04-16 04:24:39.598580"]]
322430
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322431
+ Processing by RailsIdentity::SessionsController#index as HTML
322432
+ Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA"}
322433
+ Requires a token
322434
+ Token well formatted for user 1,
322435
+ session 1
322436
+ Cache miss. Try database.
322437
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322438
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322439
+ Token well formatted and verified. Set cache.
322440
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322441
+ Attempting to get user 1
322442
+ Attempting to get RailsIdentity::User 1
322443
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322444
+ Checking to see if authorized to access object
322445
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
322446
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [3dd62964-2561-4195-af10-c85c97bd7097] Performing RailsIdentity::SessionsCleanupJob from Inline(default) with arguments: "2286ce94-038b-11e6-885f-6c4008a6fa2a"
322447
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [3dd62964-2561-4195-af10-c85c97bd7097] RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2286ce94-038b-11e6-885f-6c4008a6fa2a"]]
322448
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [3dd62964-2561-4195-af10-c85c97bd7097]  (0.0ms) SAVEPOINT active_record_1
322449
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [3dd62964-2561-4195-af10-c85c97bd7097] SQL (0.2ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "2286ce94-038b-11e6-885f-6c4008a6fa2a"]]
322450
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [3dd62964-2561-4195-af10-c85c97bd7097]  (0.0ms) RELEASE SAVEPOINT active_record_1
322451
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [3dd62964-2561-4195-af10-c85c97bd7097] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 1.2ms
322452
+ [ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 3dd62964-2561-4195-af10-c85c97bd7097) to Inline(default) with arguments: "2286ce94-038b-11e6-885f-6c4008a6fa2a"
322453
+ Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 0.6ms)
322454
+  (0.6ms) rollback transaction
322455
+  (0.1ms) begin transaction
322456
+ ----------------------------------------------------------------------------------------------
322457
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_non-existent_username
322458
+ ----------------------------------------------------------------------------------------------
322459
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322460
+ Processing by RailsIdentity::SessionsController#create as HTML
322461
+ Parameters: {"username"=>"idontexist", "password"=>"[FILTERED]"}
322462
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "idontexist"]]
322463
+ Attempting to get user
322464
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
322465
+  (0.1ms) rollback transaction
322466
+  (0.0ms) begin transaction
322467
+ ---------------------------------------------------------------------------------------------------
322468
+ RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions_using_user_id_in_routing
322469
+ ---------------------------------------------------------------------------------------------------
322470
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322471
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322472
+ Processing by RailsIdentity::SessionsController#index as HTML
322473
+ Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA"}
322474
+ Requires a token
322475
+ Token well formatted for user 1,
322476
+ session 1
322477
+ Cache miss. Try database.
322478
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322479
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322480
+ Token well formatted and verified. Set cache.
322481
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322482
+ Attempting to get user 1
322483
+ Attempting to get RailsIdentity::User 1
322484
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322485
+ Checking to see if authorized to access object
322486
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
322487
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [cfc71991-7b24-4ae7-95f2-656539a2c684] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
322488
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [cfc71991-7b24-4ae7-95f2-656539a2c684] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 0.06ms
322489
+ [ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: cfc71991-7b24-4ae7-95f2-656539a2c684) to Inline(default)
322490
+ Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.2ms)
322491
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
322492
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322493
+  (0.0ms) rollback transaction
322494
+  (0.0ms) begin transaction
322495
+ -----------------------------------------------------------------------------
322496
+ RailsIdentity::SessionsControllerTest: test_user_cannot_list_other's_sessions
322497
+ -----------------------------------------------------------------------------
322498
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322499
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
322500
+ Processing by RailsIdentity::SessionsController#index as HTML
322501
+ Parameters: {"user_id"=>"2", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA"}
322502
+ Requires a token
322503
+ Token well formatted for user 1,
322504
+ session 1
322505
+ Cache miss. Try database.
322506
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322507
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322508
+ Token well formatted and verified. Set cache.
322509
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322510
+ Attempting to get user 2
322511
+ Attempting to get RailsIdentity::User 2
322512
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
322513
+ Checking to see if authorized to access object
322514
+ Not authorized to access user 2
322515
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
322516
+  (0.1ms) rollback transaction
322517
+  (0.0ms) begin transaction
322518
+ ------------------------------------------------------------------
322519
+ RailsIdentity::SessionsControllerTest: test_public_can_see_options
322520
+ ------------------------------------------------------------------
322521
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322522
+ Processing by RailsIdentity::SessionsController#options as HTML
322523
+ Rendered text template (0.0ms)
322524
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
322525
+  (0.1ms) rollback transaction
322526
+  (0.0ms) begin transaction
322527
+ -----------------------------------------------------------------------------------------
322528
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_a_wrong_password
322529
+ -----------------------------------------------------------------------------------------
322530
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322531
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322532
+ Processing by RailsIdentity::SessionsController#create as HTML
322533
+ Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
322534
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
322535
+ Attempting to get user
322536
+ Completed 401 Unauthorized in 76ms (Views: 0.3ms | ActiveRecord: 0.1ms)
322537
+  (0.1ms) rollback transaction
322538
+  (0.0ms) begin transaction
322539
+ -----------------------------------------------------------------------
322540
+ RailsIdentity::SessionsControllerTest: test_cannot_show_other's_session
322541
+ -----------------------------------------------------------------------
322542
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322543
+ Processing by RailsIdentity::SessionsController#show as HTML
322544
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"2"}
322545
+ Requires a token
322546
+ Token well formatted for user 1,
322547
+ session 1
322548
+ Cache miss. Try database.
322549
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322550
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322551
+ Token well formatted and verified. Set cache.
322552
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322553
+ Attempting to get RailsIdentity::Session 2
322554
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2"]]
322555
+ Checking to see if authorized to access object
322556
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
322557
+ RailsIdentity::Errors::UnauthorizedError
322558
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
322559
+  (0.1ms) rollback transaction
322560
+  (0.0ms) begin transaction
322561
+ -----------------------------------------------------------------------
322562
+ RailsIdentity::SessionsControllerTest: test_public_cannot_list_sessions
322563
+ -----------------------------------------------------------------------
322564
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322565
+ Processing by RailsIdentity::SessionsController#index as HTML
322566
+ Requires a token
322567
+ Token decode error: Nil JSON web token
322568
+ Invalid token:
322569
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
322570
+  (0.1ms) rollback transaction
322571
+  (0.0ms) begin transaction
322572
+ ------------------------------------------------------------
322573
+ RailsIdentity::SessionsControllerTest: test_delete_a_session
322574
+ ------------------------------------------------------------
322575
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322576
+ Processing by RailsIdentity::SessionsController#destroy as HTML
322577
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
322578
+ Requires a token
322579
+ Token well formatted for user 1,
322580
+ session 1
322581
+ Cache miss. Try database.
322582
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322583
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322584
+ Token well formatted and verified. Set cache.
322585
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322586
+ Attempting to get RailsIdentity::Session 1
322587
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322588
+ Checking to see if authorized to access object
322589
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322590
+  (0.1ms) SAVEPOINT active_record_1
322591
+ SQL (0.1ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
322592
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322593
+ Rendered text template (0.0ms)
322594
+ Completed 204 No Content in 6ms (Views: 0.4ms | ActiveRecord: 0.4ms)
322595
+  (0.3ms) rollback transaction
322596
+  (0.0ms) begin transaction
322597
+ -------------------------------------------------------------------------
322598
+ RailsIdentity::UsersControllerTest: test_update_(issue)_a_new_reset_token
322599
+ -------------------------------------------------------------------------
322600
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322601
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322602
+ Processing by RailsIdentity::UsersController#update as HTML
322603
+ Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
322604
+ Accepts a token
322605
+ Token decode error: Nil JSON web token
322606
+ Suppressing error: Invalid token:
322607
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
322608
+  (0.1ms) SAVEPOINT active_record_1
322609
+ SQL (0.3ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "229f5fc2-038b-11e6-885f-6c4008a6fa2a"], ["secret", "a6821683-2456-4cb5-b712-67e0b1bb1fb3"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjI5ZjVmYzItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY3OSwiZXhwIjoxNDYwNzg0Mjc5fQ.9dQnlIG3F5IL8_bZz8jtfsNsRXi41fxfftzkpcr5pBg"], ["created_at", "2016-04-16 04:24:39.759789"], ["updated_at", "2016-04-16 04:24:39.759789"]]
322610
+  (0.1ms) RELEASE SAVEPOINT active_record_1
322611
+  (0.0ms) SAVEPOINT active_record_1
322612
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
322613
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjI5ZjVmYzItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY3OSwiZXhwIjoxNDYwNzg0Mjc5fQ.9dQnlIG3F5IL8_bZz8jtfsNsRXi41fxfftzkpcr5pBg"], ["updated_at", "2016-04-16 04:24:39.762842"], ["uuid", "1"]]
322614
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322615
+ [ActiveJob] RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322616
+ [ActiveJob] [ActionMailer::DeliveryJob] [0ccd6ade-a9c7-4738-9b2a-5d32936b9917] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
322617
+ [ActiveJob] [ActionMailer::DeliveryJob] [0ccd6ade-a9c7-4738-9b2a-5d32936b9917] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (1.2ms)
322618
+ [ActiveJob] [ActionMailer::DeliveryJob] [0ccd6ade-a9c7-4738-9b2a-5d32936b9917] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.3ms)
322619
+ [ActiveJob] [ActionMailer::DeliveryJob] [0ccd6ade-a9c7-4738-9b2a-5d32936b9917]
322620
+ RailsIdentity::UserMailer#password_reset: processed outbound mail in 188.5ms
322621
+ [ActiveJob] [ActionMailer::DeliveryJob] [0ccd6ade-a9c7-4738-9b2a-5d32936b9917]
322622
+ Sent mail to one@example.com (6.1ms)
322623
+ [ActiveJob] [ActionMailer::DeliveryJob] [0ccd6ade-a9c7-4738-9b2a-5d32936b9917] Date: Fri, 15 Apr 2016 23:24:39 -0500
322624
+ From: no-reply@rails-identity.com
322625
+ To: one@example.com
322626
+ Message-ID: <5711be87ebc28_1364d3fd924c52460741f4@galt.local.mail>
322627
+ Subject: [rails-identity] Password Reset
322628
+ Mime-Version: 1.0
322629
+ Content-Type: multipart/alternative;
322630
+ boundary="--==_mimepart_5711be87eab64_1364d3fd924c524607404";
322631
+ charset=UTF-8
322632
+ Content-Transfer-Encoding: 7bit
322633
+
322634
+
322635
+ ----==_mimepart_5711be87eab64_1364d3fd924c524607404
322636
+ Content-Type: text/plain;
322637
+ charset=UTF-8
322638
+ Content-Transfer-Encoding: 7bit
322639
+
322640
+ Dear one@example.com,
322641
+
322642
+ You have requested to reset your password. Here are the user UUID and reset
322643
+ token. Make a PATCH request on the UUID with the reset token to set a new
322644
+ password. For instance,
322645
+
322646
+ http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
322647
+
322648
+ will set the password to "reallysecret" (without quotes) for the user to
322649
+ whom the reset token was issued.
322650
+
322651
+ Here is the reset token: @user.reset_token
322652
+
322653
+ Good luck! :)
322654
+ rails-identity
322655
+
322656
+
322657
+ ----==_mimepart_5711be87eab64_1364d3fd924c524607404
322658
+ Content-Type: text/html;
322659
+ charset=UTF-8
322660
+ Content-Transfer-Encoding: 7bit
322661
+
322662
+ <html>
322663
+ <body>
322664
+ <p>Dear one@example.com,</p>
322665
+
322666
+ <p>You have requested to reset your password. Here are the user UUID and
322667
+ reset token. Make a PATCH request on the UUID with the reset token to set a
322668
+ new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjI5ZjVmYzItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY3OSwiZXhwIjoxNDYwNzg0Mjc5fQ.9dQnlIG3F5IL8_bZz8jtfsNsRXi41fxfftzkpcr5pBg password=reallysecret
322669
+ password_confirmation=reallysecret</pre> will set the password to
322670
+ <pre>reallysecret</pre> for the user to whom the reset token was issued.
322671
+ Here is the reset token:</p>
322672
+
322673
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjI5ZjVmYzItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY3OSwiZXhwIjoxNDYwNzg0Mjc5fQ.9dQnlIG3F5IL8_bZz8jtfsNsRXi41fxfftzkpcr5pBg</pre>
322674
+
322675
+ <p>Good luck! :)</p>
322676
+ <p><b>rails-identity</b></p>
322677
+
322678
+ </body>
322679
+ </html>
322680
+
322681
+ ----==_mimepart_5711be87eab64_1364d3fd924c524607404--
322682
+
322683
+ [ActiveJob] [ActionMailer::DeliveryJob] [0ccd6ade-a9c7-4738-9b2a-5d32936b9917] Performed ActionMailer::DeliveryJob from Inline(mailers) in 195.18ms
322684
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 0ccd6ade-a9c7-4738-9b2a-5d32936b9917) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
322685
+ Rendered text template (0.0ms)
322686
+ Completed 204 No Content in 214ms (Views: 1.7ms | ActiveRecord: 0.9ms)
322687
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322688
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = '1' LIMIT 1
322689
+ Processing by RailsIdentity::UsersController#update as HTML
322690
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
322691
+ Accepts a token
322692
+ Token well formatted for user 1,
322693
+ session 1
322694
+ Cache miss. Try database.
322695
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322696
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322697
+ Token well formatted and verified. Set cache.
322698
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322699
+ Attempting to get RailsIdentity::User 1
322700
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322701
+ Checking to see if authorized to access object
322702
+ Unpermitted parameters: token, id
322703
+  (0.0ms) SAVEPOINT active_record_1
322704
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
322705
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-16 04:24:39.978196"], ["uuid", "1"]]
322706
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322707
+ Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 1.4ms)
322708
+  (0.8ms) rollback transaction
322709
+  (0.1ms) begin transaction
322710
+ -----------------------------------------------------------------------------------------------------------
322711
+ RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_token_with_invalid_username
322712
+ -----------------------------------------------------------------------------------------------------------
322713
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322714
+ Processing by RailsIdentity::UsersController#update as HTML
322715
+ Parameters: {"issue_verification_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
322716
+ Accepts a token
322717
+ Token decode error: Nil JSON web token
322718
+ Suppressing error: Invalid token:
322719
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "doesnotexist@example.com"]]
322720
+ RailsIdentity::Errors::ObjectNotFoundError
322721
+ Completed 404 Not Found in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
322722
+  (0.1ms) rollback transaction
322723
+  (0.0ms) begin transaction
322724
+ ------------------------------------------------------------
322725
+ RailsIdentity::UsersControllerTest: test_delete_current_user
322726
+ ------------------------------------------------------------
322727
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322728
+ Processing by RailsIdentity::UsersController#destroy as HTML
322729
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"current"}
322730
+ Requires a token
322731
+ Token well formatted for user 1,
322732
+ session 1
322733
+ Cache miss. Try database.
322734
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322735
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322736
+ Token well formatted and verified. Set cache.
322737
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322738
+ Attempting to get RailsIdentity::User 1
322739
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322740
+ Checking to see if authorized to access object
322741
+  (0.0ms) SAVEPOINT active_record_1
322742
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-16 04:24:39.996679' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
322743
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322744
+ Rendered text template (0.0ms)
322745
+ Completed 204 No Content in 5ms (Views: 0.3ms | ActiveRecord: 0.4ms)
322746
+  (0.4ms) rollback transaction
322747
+  (0.1ms) begin transaction
322748
+ ------------------------------------------------------------------
322749
+ RailsIdentity::UsersControllerTest: test_admin_can_show_other_user
322750
+ ------------------------------------------------------------------
322751
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322752
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
322753
+ Processing by RailsIdentity::UsersController#show as HTML
322754
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYwODMxMDc4fQ.CSDumaIQ9SroeW6Gs3tjyvRV5BkKB5uQMiGq7ObGRSk", "id"=>"1"}
322755
+ Requires a token
322756
+ Token well formatted for user admin_one,
322757
+ session session_admin_one
322758
+ Cache miss. Try database.
322759
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
322760
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
322761
+ Token well formatted and verified. Set cache.
322762
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
322763
+ Attempting to get RailsIdentity::User 1
322764
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322765
+ Checking to see if authorized to access object
322766
+ Completed 200 OK in 7ms (Views: 0.7ms | ActiveRecord: 0.3ms)
322767
+  (0.1ms) rollback transaction
322768
+  (0.0ms) begin transaction
322769
+ ------------------------------------------------------------------
322770
+ RailsIdentity::UsersControllerTest: test_public_cannot_show_a_user
322771
+ ------------------------------------------------------------------
322772
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322773
+ Processing by RailsIdentity::UsersController#show as HTML
322774
+ Parameters: {"id"=>"1"}
322775
+ Requires a token
322776
+ Token decode error: Nil JSON web token
322777
+ Invalid token:
322778
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
322779
+  (0.1ms) rollback transaction
322780
+  (0.0ms) begin transaction
322781
+ ------------------------------------------------------
322782
+ RailsIdentity::UsersControllerTest: test_delete_a_user
322783
+ ------------------------------------------------------
322784
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322785
+ Processing by RailsIdentity::UsersController#destroy as HTML
322786
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
322787
+ Requires a token
322788
+ Token well formatted for user 1,
322789
+ session 1
322790
+ Cache miss. Try database.
322791
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322792
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322793
+ Token well formatted and verified. Set cache.
322794
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322795
+ Attempting to get RailsIdentity::User 1
322796
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322797
+ Checking to see if authorized to access object
322798
+  (0.0ms) SAVEPOINT active_record_1
322799
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-16 04:24:40.022991' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
322800
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322801
+ Rendered text template (0.0ms)
322802
+ Completed 204 No Content in 5ms (Views: 0.3ms | ActiveRecord: 0.4ms)
322803
+  (0.4ms) rollback transaction
322804
+  (0.1ms) begin transaction
322805
+ ------------------------------------------------------------
322806
+ RailsIdentity::UsersControllerTest: test_show_a_current_user
322807
+ ------------------------------------------------------------
322808
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322809
+ Processing by RailsIdentity::UsersController#show as HTML
322810
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"current"}
322811
+ Requires a token
322812
+ Token well formatted for user 1,
322813
+ session 1
322814
+ Cache miss. Try database.
322815
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322816
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322817
+ Token well formatted and verified. Set cache.
322818
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322819
+ Attempting to get RailsIdentity::User 1
322820
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322821
+ Checking to see if authorized to access object
322822
+ Completed 200 OK in 7ms (Views: 0.7ms | ActiveRecord: 0.3ms)
322823
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322824
+  (0.1ms) rollback transaction
322825
+  (0.0ms) begin transaction
322826
+ ----------------------------------------------------
322827
+ RailsIdentity::UsersControllerTest: test_show_a_user
322828
+ ----------------------------------------------------
322829
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322830
+ Processing by RailsIdentity::UsersController#show as HTML
322831
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
322832
+ Requires a token
322833
+ Token well formatted for user 1,
322834
+ session 1
322835
+ Cache miss. Try database.
322836
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322837
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322838
+ Token well formatted and verified. Set cache.
322839
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322840
+ Attempting to get RailsIdentity::User 1
322841
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322842
+ Checking to see if authorized to access object
322843
+ Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
322844
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322845
+  (0.1ms) rollback transaction
322846
+  (0.0ms) begin transaction
322847
+ ------------------------------------------------------------------------------------
322848
+ RailsIdentity::UsersControllerTest: test_cannot_update_password_with_a_invalid_token
322849
+ ------------------------------------------------------------------------------------
322850
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322851
+ Processing by RailsIdentity::UsersController#update as HTML
322852
+ Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
322853
+ Accepts a token
322854
+ Token well formatted for user 1,
322855
+ session 1
322856
+ Cache miss. Try database.
322857
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322858
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322859
+ Token well formatted and verified. Set cache.
322860
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322861
+ Attempting to get RailsIdentity::User 1
322862
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322863
+ Checking to see if authorized to access object
322864
+ RailsIdentity::Errors::UnauthorizedError
322865
+ Completed 401 Unauthorized in 77ms (Views: 0.2ms | ActiveRecord: 0.2ms)
322866
+  (0.1ms) rollback transaction
322867
+  (0.0ms) begin transaction
322868
+ ------------------------------------------------------------------------------------------------------
322869
+ RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_with_invalid_username
322870
+ ------------------------------------------------------------------------------------------------------
322871
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322872
+ Processing by RailsIdentity::UsersController#update as HTML
322873
+ Parameters: {"issue_reset_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
322874
+ Accepts a token
322875
+ Token decode error: Nil JSON web token
322876
+ Suppressing error: Invalid token:
322877
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "doesnotexist@example.com"]]
322878
+ RailsIdentity::Errors::ObjectNotFoundError
322879
+ Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
322880
+  (0.1ms) rollback transaction
322881
+  (0.1ms) begin transaction
322882
+ ---------------------------------------------------------------------------
322883
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_no_token_payload
322884
+ ---------------------------------------------------------------------------
322885
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322886
+ Processing by RailsIdentity::UsersController#show as HTML
322887
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.f-TiKtiwMqWfvQDAaHR75Six53x2pK07rzxlDePfrLM", "id"=>"1"}
322888
+ Requires a token
322889
+ User UUID or session UUID is nil
322890
+ Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.f-TiKtiwMqWfvQDAaHR75Six53x2pK07rzxlDePfrLM
322891
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
322892
+  (0.1ms) rollback transaction
322893
+  (0.0ms) begin transaction
322894
+ ------------------------------------------------------------------------------
322895
+ RailsIdentity::UsersControllerTest: test_update_(reissue)_a_verification_token
322896
+ ------------------------------------------------------------------------------
322897
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322898
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322899
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = '1' LIMIT 1
322900
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322901
+ Processing by RailsIdentity::UsersController#update as HTML
322902
+ Parameters: {"issue_verification_token"=>true, "username"=>"one@example.com", "id"=>"current"}
322903
+ Accepts a token
322904
+ Token decode error: Nil JSON web token
322905
+ Suppressing error: Invalid token:
322906
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
322907
+  (0.0ms) SAVEPOINT active_record_1
322908
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "22da4812-038b-11e6-885f-6c4008a6fa2a"], ["secret", "16602ab6-4fdd-44be-a684-89311116a247"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjJkYTQ4MTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.0_Mu62lNv1t4wssS7V-fn2tIghzcXlKyd0Q-CQOX4zc"], ["created_at", "2016-04-16 04:24:40.145420"], ["updated_at", "2016-04-16 04:24:40.145420"]]
322909
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322910
+  (0.0ms) SAVEPOINT active_record_1
322911
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
322912
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjJkYTQ4MTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.0_Mu62lNv1t4wssS7V-fn2tIghzcXlKyd0Q-CQOX4zc"], ["updated_at", "2016-04-16 04:24:40.147390"], ["uuid", "1"]]
322913
+  (0.0ms) RELEASE SAVEPOINT active_record_1
322914
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322915
+ [ActiveJob] [ActionMailer::DeliveryJob] [2ca6a00c-ef08-4522-9ec9-ef841c1b1201] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
322916
+ [ActiveJob] [ActionMailer::DeliveryJob] [2ca6a00c-ef08-4522-9ec9-ef841c1b1201] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.4ms)
322917
+ [ActiveJob] [ActionMailer::DeliveryJob] [2ca6a00c-ef08-4522-9ec9-ef841c1b1201] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.3ms)
322918
+ [ActiveJob] [ActionMailer::DeliveryJob] [2ca6a00c-ef08-4522-9ec9-ef841c1b1201]
322919
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 6.5ms
322920
+ [ActiveJob] [ActionMailer::DeliveryJob] [2ca6a00c-ef08-4522-9ec9-ef841c1b1201]
322921
+ Sent mail to one@example.com (3.6ms)
322922
+ [ActiveJob] [ActionMailer::DeliveryJob] [2ca6a00c-ef08-4522-9ec9-ef841c1b1201] Date: Fri, 15 Apr 2016 23:24:40 -0500
322923
+ From: no-reply@rails-identity.com
322924
+ To: one@example.com
322925
+ Message-ID: <5711be8826a8d_1364d3fd924c52460743fd@galt.local.mail>
322926
+ Subject: [rails-identity] Email Confirmation
322927
+ Mime-Version: 1.0
322928
+ Content-Type: multipart/alternative;
322929
+ boundary="--==_mimepart_5711be8826134_1364d3fd924c5246074212";
322930
+ charset=UTF-8
322931
+ Content-Transfer-Encoding: 7bit
322932
+
322933
+
322934
+ ----==_mimepart_5711be8826134_1364d3fd924c5246074212
322935
+ Content-Type: text/plain;
322936
+ charset=UTF-8
322937
+ Content-Transfer-Encoding: 7bit
322938
+
322939
+ Dear one@example.com,
322940
+
322941
+ Please confirm your account with rails-identity by making a PATCH request
322942
+ on the current user with a provided verification token. For example,
322943
+
322944
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjJkYTQ4MTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.0_Mu62lNv1t4wssS7V-fn2tIghzcXlKyd0Q-CQOX4zc verified=true
322945
+
322946
+ will confirm the account. Here is the verification token:
322947
+
322948
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjJkYTQ4MTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.0_Mu62lNv1t4wssS7V-fn2tIghzcXlKyd0Q-CQOX4zc
322949
+
322950
+ Thank you for using rails-identity,
322951
+ rails-identity
322952
+
322953
+
322954
+ ----==_mimepart_5711be8826134_1364d3fd924c5246074212
322955
+ Content-Type: text/html;
322956
+ charset=UTF-8
322957
+ Content-Transfer-Encoding: 7bit
322958
+
322959
+ <html>
322960
+ <body>
322961
+ <p>Dear one@example.com,</p>
322962
+
322963
+ <p>Please confirm your account with rails-identity by making a PATCH request
322964
+ on the current user with a provided verification token. For example,
322965
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjJkYTQ4MTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.0_Mu62lNv1t4wssS7V-fn2tIghzcXlKyd0Q-CQOX4zc
322966
+ verified=true</pre> will confirm the account. Here is the verification
322967
+ token:</p>
322968
+
322969
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjJkYTQ4MTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.0_Mu62lNv1t4wssS7V-fn2tIghzcXlKyd0Q-CQOX4zc</pre>
322970
+
322971
+ <p>Thank you for using rails-identity</p>
322972
+ <p><b>rails-identity</b></p>
322973
+
322974
+ </body>
322975
+ </html>
322976
+
322977
+ ----==_mimepart_5711be8826134_1364d3fd924c5246074212--
322978
+
322979
+ [ActiveJob] [ActionMailer::DeliveryJob] [2ca6a00c-ef08-4522-9ec9-ef841c1b1201] Performed ActionMailer::DeliveryJob from Inline(mailers) in 10.54ms
322980
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 2ca6a00c-ef08-4522-9ec9-ef841c1b1201) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
322981
+ Rendered text template (0.0ms)
322982
+ Completed 204 No Content in 18ms (Views: 0.3ms | ActiveRecord: 0.6ms)
322983
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = '1' LIMIT 1
322984
+ Processing by RailsIdentity::UsersController#update as HTML
322985
+ Parameters: {"verified"=>true, "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjJkYTQ4MTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.0_Mu62lNv1t4wssS7V-fn2tIghzcXlKyd0Q-CQOX4zc", "id"=>"current"}
322986
+ Accepts a token
322987
+ Token well formatted for user 1,
322988
+ session 22da4812-038b-11e6-885f-6c4008a6fa2a
322989
+ Cache miss. Try database.
322990
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322991
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "22da4812-038b-11e6-885f-6c4008a6fa2a"]]
322992
+ Token well formatted and verified. Set cache.
322993
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322994
+ Attempting to get RailsIdentity::User 1
322995
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
322996
+ Checking to see if authorized to access object
322997
+ Unpermitted parameters: token, id
322998
+  (0.1ms) SAVEPOINT active_record_1
322999
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
323000
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323001
+ Completed 200 OK in 44ms (Views: 0.4ms | ActiveRecord: 1.0ms)
323002
+  (0.4ms) rollback transaction
323003
+  (0.0ms) begin transaction
323004
+ ---------------------------------------------------------------
323005
+ RailsIdentity::UsersControllerTest: test_public_can_see_options
323006
+ ---------------------------------------------------------------
323007
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323008
+ Processing by RailsIdentity::UsersController#options as HTML
323009
+ Rendered text template (0.0ms)
323010
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
323011
+  (0.1ms) rollback transaction
323012
+  (0.0ms) begin transaction
323013
+ --------------------------------------------------------------------
323014
+ RailsIdentity::UsersControllerTest: test_non-admin_cannot_list_users
323015
+ --------------------------------------------------------------------
323016
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323017
+ Processing by RailsIdentity::UsersController#index as HTML
323018
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA"}
323019
+ Requires an admin token
323020
+ Token well formatted for user 1,
323021
+ session 1
323022
+ Cache miss. Try database.
323023
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323024
+ Well-formed but invalid user token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA
323025
+ Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
323026
+  (0.1ms) rollback transaction
323027
+  (0.0ms) begin transaction
323028
+ ------------------------------------------------------
323029
+ RailsIdentity::UsersControllerTest: test_update_a_user
323030
+ ------------------------------------------------------
323031
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323032
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323033
+ Processing by RailsIdentity::UsersController#update as HTML
323034
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
323035
+ Accepts a token
323036
+ Token well formatted for user 1,
323037
+ session 1
323038
+ Cache miss. Try database.
323039
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323040
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323041
+ Token well formatted and verified. Set cache.
323042
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323043
+ Attempting to get RailsIdentity::User 1
323044
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323045
+ Checking to see if authorized to access object
323046
+ Unpermitted parameters: token, id
323047
+  (0.0ms) SAVEPOINT active_record_1
323048
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
323049
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-16 04:24:40.230105"], ["uuid", "1"]]
323050
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323051
+ Completed 200 OK in 8ms (Views: 0.6ms | ActiveRecord: 0.5ms)
323052
+  (0.4ms) rollback transaction
323053
+  (0.0ms) begin transaction
323054
+ ---------------------------------------------------------------------------------------------
323055
+ RailsIdentity::UsersControllerTest: test_update_a_user_with_a_new_password_using_old_password
323056
+ ---------------------------------------------------------------------------------------------
323057
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323058
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323059
+ Processing by RailsIdentity::UsersController#update as HTML
323060
+ Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
323061
+ Accepts a token
323062
+ Token well formatted for user 1,
323063
+ session 1
323064
+ Cache miss. Try database.
323065
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323066
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323067
+ Token well formatted and verified. Set cache.
323068
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323069
+ Attempting to get RailsIdentity::User 1
323070
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323071
+ Checking to see if authorized to access object
323072
+ Unpermitted parameters: old_password, token, id
323073
+  (0.1ms) SAVEPOINT active_record_1
323074
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
323075
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["password_digest", "$2a$04$3XEnAz4xDVJFm3Nv3v7vNeUD5lLpmvBkt.eflVwbl/BvSxAPn6mMW"], ["updated_at", "2016-04-16 04:24:40.310192"], ["uuid", "1"]]
323076
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323077
+ Completed 200 OK in 74ms (Views: 0.4ms | ActiveRecord: 0.6ms)
323078
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323079
+  (0.4ms) rollback transaction
323080
+  (0.0ms) begin transaction
323081
+ -----------------------------------------------------------------------
323082
+ RailsIdentity::UsersControllerTest: test_cannot_show_a_nonexisting_user
323083
+ -----------------------------------------------------------------------
323084
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323085
+ Processing by RailsIdentity::UsersController#show as HTML
323086
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"999"}
323087
+ Requires a token
323088
+ Token well formatted for user 1,
323089
+ session 1
323090
+ Cache miss. Try database.
323091
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323092
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323093
+ Token well formatted and verified. Set cache.
323094
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323095
+ Attempting to get RailsIdentity::User 999
323096
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "999"]]
323097
+ RailsIdentity::User 999 cannot be found
323098
+ Completed 404 Not Found in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
323099
+  (0.1ms) rollback transaction
323100
+  (0.0ms) begin transaction
323101
+ ---------------------------------------------------------------------
323102
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_ill-formed
323103
+ ---------------------------------------------------------------------
323104
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323105
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323106
+ Processing by RailsIdentity::UsersController#show as HTML
323107
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzgwNzQwfQ.9IKk6s1MipkssieOmDI9sSOuu0xeolByoWjTmp3isjQ", "id"=>"1"}
323108
+ Requires a token
323109
+ User UUID or session UUID is nil
323110
+ Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzgwNzQwfQ.9IKk6s1MipkssieOmDI9sSOuu0xeolByoWjTmp3isjQ
323111
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
323112
+  (0.1ms) rollback transaction
323113
+  (0.0ms) begin transaction
323114
+ ------------------------------------------------------------------------------
323115
+ RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_username
323116
+ ------------------------------------------------------------------------------
323117
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323118
+ Processing by RailsIdentity::UsersController#create as HTML
323119
+ Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
323120
+ Accepts a token
323121
+ Token decode error: Nil JSON web token
323122
+ Suppressing error: Invalid token:
323123
+ Create new user
323124
+  (0.0ms) SAVEPOINT active_record_1
323125
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" IS NULL AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
323126
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
323127
+ Completed 400 Bad Request in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
323128
+  (0.0ms) rollback transaction
323129
+  (0.0ms) begin transaction
323130
+ ---------------------------------------------------------------------------------------------
323131
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_non-existing_token
323132
+ ---------------------------------------------------------------------------------------------
323133
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323134
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323135
+ Processing by RailsIdentity::UsersController#show as HTML
323136
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjA3ODA2ODAsImV4cCI6MTQ2MDc4MDc0MH0.qMEzChqewjLJOnAyir010GUvdMMeDS3C4PuOS9e22x0", "id"=>"1"}
323137
+ Requires a token
323138
+ Token well formatted for user 1,
323139
+ session 1
323140
+ Cache miss. Try database.
323141
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323142
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323143
+ Signature verification raised
323144
+ Cannot verify token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjA3ODA2ODAsImV4cCI6MTQ2MDc4MDc0MH0.qMEzChqewjLJOnAyir010GUvdMMeDS3C4PuOS9e22x0
323145
+ Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
323146
+  (0.1ms) rollback transaction
323147
+  (0.0ms) begin transaction
323148
+ -----------------------------------------------------------------
323149
+ RailsIdentity::UsersControllerTest: test_admin_can_list_all_users
323150
+ -----------------------------------------------------------------
323151
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323152
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
323153
+ Processing by RailsIdentity::UsersController#index as HTML
323154
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYwODMxMDc4fQ.CSDumaIQ9SroeW6Gs3tjyvRV5BkKB5uQMiGq7ObGRSk"}
323155
+ Requires an admin token
323156
+ Token well formatted for user admin_one,
323157
+ session session_admin_one
323158
+ Cache miss. Try database.
323159
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
323160
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
323161
+ Token well formatted and verified. Set cache.
323162
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
323163
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL
323164
+ Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 0.3ms)
323165
+  (0.1ms) SELECT COUNT(*) FROM "rails_identity_sessions"
323166
+  (0.1ms) rollback transaction
323167
+  (0.0ms) begin transaction
323168
+ --------------------------------------------------------------------------------
323169
+ RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_a_password
323170
+ --------------------------------------------------------------------------------
323171
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323172
+ Processing by RailsIdentity::UsersController#create as HTML
323173
+ Parameters: {"username"=>"foo@example.com"}
323174
+ Accepts a token
323175
+ Token decode error: Nil JSON web token
323176
+ Suppressing error: Invalid token:
323177
+ Create new user
323178
+  (0.0ms) SAVEPOINT active_record_1
323179
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
323180
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
323181
+ Completed 400 Bad Request in 3ms (Views: 0.2ms | ActiveRecord: 0.2ms)
323182
+  (0.1ms) rollback transaction
323183
+  (0.0ms) begin transaction
323184
+ ----------------------------------------------------------------------------------------
323185
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_bogus_payload
323186
+ ----------------------------------------------------------------------------------------
323187
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323188
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323189
+ Processing by RailsIdentity::UsersController#show as HTML
323190
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzgwNzQwfQ.6MuWIFw9QnjdwWtjIVXJ3NqaeV_0BHtejRe2HXNR8NA", "id"=>"1"}
323191
+ Requires a token
323192
+ Token well formatted for user 1,
323193
+ session doesnotexist
323194
+ Cache miss. Try database.
323195
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323196
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "doesnotexist"]]
323197
+ Well-formed but invalid session token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzgwNzQwfQ.6MuWIFw9QnjdwWtjIVXJ3NqaeV_0BHtejRe2HXNR8NA
323198
+ Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
323199
+  (0.1ms) rollback transaction
323200
+  (0.0ms) begin transaction
323201
+ -------------------------------------------------------------------------
323202
+ RailsIdentity::UsersControllerTest: test_user_cannot_create_an_admin_user
323203
+ -------------------------------------------------------------------------
323204
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323205
+ Processing by RailsIdentity::UsersController#create as HTML
323206
+ Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100"}
323207
+ Accepts a token
323208
+ Token decode error: Nil JSON web token
323209
+ Suppressing error: Invalid token:
323210
+ Create new user
323211
+ Unpermitted parameter: role
323212
+  (0.0ms) SAVEPOINT active_record_1
323213
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
323214
+ SQL (0.2ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$izvABSMysLN.fWLVvLhonuIApPBhXcBO4cqCT9vgPU1eO2kUSruYC"], ["role", 10], ["created_at", "2016-04-16 04:24:40.374315"], ["updated_at", "2016-04-16 04:24:40.374315"], ["uuid", "22fd57c6-038b-11e6-885f-6c4008a6fa2a"]]
323215
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323216
+  (0.0ms) SAVEPOINT active_record_1
323217
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "22fd57c6-038b-11e6-885f-6c4008a6fa2a"], ["uuid", "22fd9696-038b-11e6-885f-6c4008a6fa2a"], ["secret", "6bc089e1-c405-49ab-b1ae-6645a4e1c564"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMmZkNTdjNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMmZkOTY5Ni0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.alJh9gdFI_ZVBjLbyzxqxcLeRMBsYr3cPQHwOLwl8Xs"], ["created_at", "2016-04-16 04:24:40.376768"], ["updated_at", "2016-04-16 04:24:40.376768"]]
323218
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323219
+  (0.0ms) SAVEPOINT active_record_1
323220
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '22fd57c6-038b-11e6-885f-6c4008a6fa2a') LIMIT 1
323221
+ SQL (0.0ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMmZkNTdjNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMmZkOTY5Ni0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.alJh9gdFI_ZVBjLbyzxqxcLeRMBsYr3cPQHwOLwl8Xs"], ["updated_at", "2016-04-16 04:24:40.378471"], ["uuid", "22fd57c6-038b-11e6-885f-6c4008a6fa2a"]]
323222
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323223
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "22fd57c6-038b-11e6-885f-6c4008a6fa2a"]]
323224
+ [ActiveJob] [ActionMailer::DeliveryJob] [054d5900-4b5f-4f35-87a1-312e73c9655d] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/22fd57c6-038b-11e6-885f-6c4008a6fa2a
323225
+ [ActiveJob] [ActionMailer::DeliveryJob] [054d5900-4b5f-4f35-87a1-312e73c9655d] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
323226
+ [ActiveJob] [ActionMailer::DeliveryJob] [054d5900-4b5f-4f35-87a1-312e73c9655d] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
323227
+ [ActiveJob] [ActionMailer::DeliveryJob] [054d5900-4b5f-4f35-87a1-312e73c9655d]
323228
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.4ms
323229
+ [ActiveJob] [ActionMailer::DeliveryJob] [054d5900-4b5f-4f35-87a1-312e73c9655d]
323230
+ Sent mail to foo@example.com (3.9ms)
323231
+ [ActiveJob] [ActionMailer::DeliveryJob] [054d5900-4b5f-4f35-87a1-312e73c9655d] Date: Fri, 15 Apr 2016 23:24:40 -0500
323232
+ From: no-reply@rails-identity.com
323233
+ To: foo@example.com
323234
+ Message-ID: <5711be885e15f_1364d3fd924c52460745d8@galt.local.mail>
323235
+ Subject: [rails-identity] Email Confirmation
323236
+ Mime-Version: 1.0
323237
+ Content-Type: multipart/alternative;
323238
+ boundary="--==_mimepart_5711be885d772_1364d3fd924c524607449e";
323239
+ charset=UTF-8
323240
+ Content-Transfer-Encoding: 7bit
323241
+
323242
+
323243
+ ----==_mimepart_5711be885d772_1364d3fd924c524607449e
323244
+ Content-Type: text/plain;
323245
+ charset=UTF-8
323246
+ Content-Transfer-Encoding: 7bit
323247
+
323248
+ Dear foo@example.com,
323249
+
323250
+ Please confirm your account with rails-identity by making a PATCH request
323251
+ on the current user with a provided verification token. For example,
323252
+
323253
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMmZkNTdjNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMmZkOTY5Ni0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.alJh9gdFI_ZVBjLbyzxqxcLeRMBsYr3cPQHwOLwl8Xs verified=true
323254
+
323255
+ will confirm the account. Here is the verification token:
323256
+
323257
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMmZkNTdjNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMmZkOTY5Ni0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.alJh9gdFI_ZVBjLbyzxqxcLeRMBsYr3cPQHwOLwl8Xs
323258
+
323259
+ Thank you for using rails-identity,
323260
+ rails-identity
323261
+
323262
+
323263
+ ----==_mimepart_5711be885d772_1364d3fd924c524607449e
323264
+ Content-Type: text/html;
323265
+ charset=UTF-8
323266
+ Content-Transfer-Encoding: 7bit
323267
+
323268
+ <html>
323269
+ <body>
323270
+ <p>Dear foo@example.com,</p>
323271
+
323272
+ <p>Please confirm your account with rails-identity by making a PATCH request
323273
+ on the current user with a provided verification token. For example,
323274
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMmZkNTdjNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMmZkOTY5Ni0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.alJh9gdFI_ZVBjLbyzxqxcLeRMBsYr3cPQHwOLwl8Xs
323275
+ verified=true</pre> will confirm the account. Here is the verification
323276
+ token:</p>
323277
+
323278
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMmZkNTdjNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMmZkOTY5Ni0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.alJh9gdFI_ZVBjLbyzxqxcLeRMBsYr3cPQHwOLwl8Xs</pre>
323279
+
323280
+ <p>Thank you for using rails-identity</p>
323281
+ <p><b>rails-identity</b></p>
323282
+
323283
+ </body>
323284
+ </html>
323285
+
323286
+ ----==_mimepart_5711be885d772_1364d3fd924c524607449e--
323287
+
323288
+ [ActiveJob] [ActionMailer::DeliveryJob] [054d5900-4b5f-4f35-87a1-312e73c9655d] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.8ms
323289
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 054d5900-4b5f-4f35-87a1-312e73c9655d) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/22fd57c6-038b-11e6-885f-6c4008a6fa2a
323290
+ Completed 201 Created in 17ms (Views: 0.3ms | ActiveRecord: 0.8ms)
323291
+  (0.7ms) rollback transaction
323292
+  (0.1ms) begin transaction
323293
+ ------------------------------------------------------------------------------------
323294
+ RailsIdentity::UsersControllerTest: test_cannot_update_password_with_non-reset_token
323295
+ ------------------------------------------------------------------------------------
323296
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323297
+ Processing by RailsIdentity::UsersController#update as HTML
323298
+ Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
323299
+ Accepts a token
323300
+ Token well formatted for user 1,
323301
+ session 1
323302
+ Cache miss. Try database.
323303
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323304
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323305
+ Token well formatted and verified. Set cache.
323306
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323307
+ Attempting to get RailsIdentity::User 1
323308
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323309
+ Checking to see if authorized to access object
323310
+ RailsIdentity::Errors::UnauthorizedError
323311
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
323312
+  (0.1ms) rollback transaction
323313
+  (0.0ms) begin transaction
323314
+ --------------------------------------------------------------------
323315
+ RailsIdentity::UsersControllerTest: test_admin_can_delete_other_user
323316
+ --------------------------------------------------------------------
323317
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323318
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
323319
+ Processing by RailsIdentity::UsersController#destroy as HTML
323320
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYwODMxMDc4fQ.CSDumaIQ9SroeW6Gs3tjyvRV5BkKB5uQMiGq7ObGRSk", "id"=>"1"}
323321
+ Requires a token
323322
+ Token well formatted for user admin_one,
323323
+ session session_admin_one
323324
+ Cache miss. Try database.
323325
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
323326
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
323327
+ Token well formatted and verified. Set cache.
323328
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
323329
+ Attempting to get RailsIdentity::User 1
323330
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323331
+ Checking to see if authorized to access object
323332
+  (0.1ms) SAVEPOINT active_record_1
323333
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-16 04:24:40.408586' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
323334
+  (0.1ms) RELEASE SAVEPOINT active_record_1
323335
+ Rendered text template (0.0ms)
323336
+ Completed 204 No Content in 6ms (Views: 0.4ms | ActiveRecord: 0.5ms)
323337
+  (0.4ms) rollback transaction
323338
+  (0.1ms) begin transaction
323339
+ ---------------------------------------------------------------
323340
+ RailsIdentity::UsersControllerTest: test_cannot_show_other_user
323341
+ ---------------------------------------------------------------
323342
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323343
+ Processing by RailsIdentity::UsersController#show as HTML
323344
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"2"}
323345
+ Requires a token
323346
+ Token well formatted for user 1,
323347
+ session 1
323348
+ Cache miss. Try database.
323349
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323350
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323351
+ Token well formatted and verified. Set cache.
323352
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323353
+ Attempting to get RailsIdentity::User 2
323354
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
323355
+ Checking to see if authorized to access object
323356
+ RailsIdentity::Errors::UnauthorizedError
323357
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
323358
+  (0.1ms) rollback transaction
323359
+  (0.0ms) begin transaction
323360
+ -------------------------------------------------------------------
323361
+ RailsIdentity::UsersControllerTest: test_cannot_delete_another_user
323362
+ -------------------------------------------------------------------
323363
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323364
+ Processing by RailsIdentity::UsersController#destroy as HTML
323365
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"2"}
323366
+ Requires a token
323367
+ Token well formatted for user 1,
323368
+ session 1
323369
+ Cache miss. Try database.
323370
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323371
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323372
+ Token well formatted and verified. Set cache.
323373
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323374
+ Attempting to get RailsIdentity::User 2
323375
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
323376
+ Checking to see if authorized to access object
323377
+ RailsIdentity::Errors::UnauthorizedError
323378
+ Completed 401 Unauthorized in 7ms (Views: 0.3ms | ActiveRecord: 0.3ms)
323379
+  (0.1ms) rollback transaction
323380
+  (0.0ms) begin transaction
323381
+ --------------------------------------------------------------------------
323382
+ RailsIdentity::UsersControllerTest: test_update_password_using_reset_token
323383
+ --------------------------------------------------------------------------
323384
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323385
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323386
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323387
+ Processing by RailsIdentity::UsersController#update as HTML
323388
+ Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
323389
+ Accepts a token
323390
+ Token decode error: Nil JSON web token
323391
+ Suppressing error: Invalid token:
323392
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
323393
+  (0.0ms) SAVEPOINT active_record_1
323394
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "230748c6-038b-11e6-885f-6c4008a6fa2a"], ["secret", "f47636e0-4251-4e72-b34b-5c3d248389e7"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjMwNzQ4YzYtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.PoB-xp586ySejISisvL7k6BoGO3lo8KDI2e2t_ZB9_o"], ["created_at", "2016-04-16 04:24:40.440349"], ["updated_at", "2016-04-16 04:24:40.440349"]]
323395
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323396
+  (0.0ms) SAVEPOINT active_record_1
323397
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
323398
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjMwNzQ4YzYtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.PoB-xp586ySejISisvL7k6BoGO3lo8KDI2e2t_ZB9_o"], ["updated_at", "2016-04-16 04:24:40.442384"], ["uuid", "1"]]
323399
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323400
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323401
+ [ActiveJob] [ActionMailer::DeliveryJob] [c00e879c-a466-4bd0-a897-0ff94aebf2b3] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
323402
+ [ActiveJob] [ActionMailer::DeliveryJob] [c00e879c-a466-4bd0-a897-0ff94aebf2b3] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.2ms)
323403
+ [ActiveJob] [ActionMailer::DeliveryJob] [c00e879c-a466-4bd0-a897-0ff94aebf2b3] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.1ms)
323404
+ [ActiveJob] [ActionMailer::DeliveryJob] [c00e879c-a466-4bd0-a897-0ff94aebf2b3]
323405
+ RailsIdentity::UserMailer#password_reset: processed outbound mail in 4.3ms
323406
+ [ActiveJob] [ActionMailer::DeliveryJob] [c00e879c-a466-4bd0-a897-0ff94aebf2b3]
323407
+ Sent mail to one@example.com (4.9ms)
323408
+ [ActiveJob] [ActionMailer::DeliveryJob] [c00e879c-a466-4bd0-a897-0ff94aebf2b3] Date: Fri, 15 Apr 2016 23:24:40 -0500
323409
+ From: no-reply@rails-identity.com
323410
+ To: one@example.com
323411
+ Message-ID: <5711be886e584_1364d3fd924c5246074716@galt.local.mail>
323412
+ Subject: [rails-identity] Password Reset
323413
+ Mime-Version: 1.0
323414
+ Content-Type: multipart/alternative;
323415
+ boundary="--==_mimepart_5711be886d736_1364d3fd924c52460746de";
323416
+ charset=UTF-8
323417
+ Content-Transfer-Encoding: 7bit
323418
+
323419
+
323420
+ ----==_mimepart_5711be886d736_1364d3fd924c52460746de
323421
+ Content-Type: text/plain;
323422
+ charset=UTF-8
323423
+ Content-Transfer-Encoding: 7bit
323424
+
323425
+ Dear one@example.com,
323426
+
323427
+ You have requested to reset your password. Here are the user UUID and reset
323428
+ token. Make a PATCH request on the UUID with the reset token to set a new
323429
+ password. For instance,
323430
+
323431
+ http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
323432
+
323433
+ will set the password to "reallysecret" (without quotes) for the user to
323434
+ whom the reset token was issued.
323435
+
323436
+ Here is the reset token: @user.reset_token
323437
+
323438
+ Good luck! :)
323439
+ rails-identity
323440
+
323441
+
323442
+ ----==_mimepart_5711be886d736_1364d3fd924c52460746de
323443
+ Content-Type: text/html;
323444
+ charset=UTF-8
323445
+ Content-Transfer-Encoding: 7bit
323446
+
323447
+ <html>
323448
+ <body>
323449
+ <p>Dear one@example.com,</p>
323450
+
323451
+ <p>You have requested to reset your password. Here are the user UUID and
323452
+ reset token. Make a PATCH request on the UUID with the reset token to set a
323453
+ new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjMwNzQ4YzYtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.PoB-xp586ySejISisvL7k6BoGO3lo8KDI2e2t_ZB9_o password=reallysecret
323454
+ password_confirmation=reallysecret</pre> will set the password to
323455
+ <pre>reallysecret</pre> for the user to whom the reset token was issued.
323456
+ Here is the reset token:</p>
323457
+
323458
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjMwNzQ4YzYtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.PoB-xp586ySejISisvL7k6BoGO3lo8KDI2e2t_ZB9_o</pre>
323459
+
323460
+ <p>Good luck! :)</p>
323461
+ <p><b>rails-identity</b></p>
323462
+
323463
+ </body>
323464
+ </html>
323465
+
323466
+ ----==_mimepart_5711be886d736_1364d3fd924c52460746de--
323467
+
323468
+ [ActiveJob] [ActionMailer::DeliveryJob] [c00e879c-a466-4bd0-a897-0ff94aebf2b3] Performed ActionMailer::DeliveryJob from Inline(mailers) in 9.94ms
323469
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: c00e879c-a466-4bd0-a897-0ff94aebf2b3) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
323470
+ Rendered text template (0.0ms)
323471
+ Completed 204 No Content in 17ms (Views: 0.4ms | ActiveRecord: 0.5ms)
323472
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323473
+ Processing by RailsIdentity::UsersController#update as HTML
323474
+ Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjMwNzQ4YzYtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.PoB-xp586ySejISisvL7k6BoGO3lo8KDI2e2t_ZB9_o", "id"=>"1"}
323475
+ Accepts a token
323476
+ Token well formatted for user 1,
323477
+ session 230748c6-038b-11e6-885f-6c4008a6fa2a
323478
+ Cache miss. Try database.
323479
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323480
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "230748c6-038b-11e6-885f-6c4008a6fa2a"]]
323481
+ Token well formatted and verified. Set cache.
323482
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323483
+ Attempting to get RailsIdentity::User 1
323484
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323485
+ Checking to see if authorized to access object
323486
+ Unpermitted parameters: token, id
323487
+  (0.0ms) SAVEPOINT active_record_1
323488
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
323489
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["password_digest", "$2a$04$XRsnTur4cOE0dEeesv66KeOR91rquoAwCUZ04YdTpxsUrtHwVj9X2"], ["updated_at", "2016-04-16 04:24:40.463655"], ["uuid", "1"]]
323490
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323491
+ Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 1.0ms)
323492
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323493
+  (0.8ms) rollback transaction
323494
+  (0.0ms) begin transaction
323495
+ ------------------------------------------------------------
323496
+ RailsIdentity::UsersControllerTest: test_update_current_user
323497
+ ------------------------------------------------------------
323498
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323499
+ Processing by RailsIdentity::UsersController#update as HTML
323500
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"current"}
323501
+ Accepts a token
323502
+ Token well formatted for user 1,
323503
+ session 1
323504
+ Cache miss. Try database.
323505
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323506
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323507
+ Token well formatted and verified. Set cache.
323508
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323509
+ Attempting to get RailsIdentity::User 1
323510
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323511
+ Checking to see if authorized to access object
323512
+ Unpermitted parameters: token, id
323513
+  (0.1ms) SAVEPOINT active_record_1
323514
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
323515
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-16 04:24:40.477913"], ["uuid", "1"]]
323516
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323517
+ Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 0.5ms)
323518
+  (0.4ms) rollback transaction
323519
+  (0.1ms) begin transaction
323520
+ -----------------------------------------------------------------------
323521
+ RailsIdentity::UsersControllerTest: test_admin_can_create_an_admin_user
323522
+ -----------------------------------------------------------------------
323523
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323524
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
323525
+ Processing by RailsIdentity::UsersController#create as HTML
323526
+ Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYwODMxMDc4fQ.CSDumaIQ9SroeW6Gs3tjyvRV5BkKB5uQMiGq7ObGRSk"}
323527
+ Accepts a token
323528
+ Token well formatted for user admin_one,
323529
+ session session_admin_one
323530
+ Cache miss. Try database.
323531
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
323532
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
323533
+ Token well formatted and verified. Set cache.
323534
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
323535
+ Create new user
323536
+ Unpermitted parameter: token
323537
+  (0.0ms) SAVEPOINT active_record_1
323538
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
323539
+ SQL (0.1ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$yWM.HlfqnooOrrEBpN.C7OBQ12Gz1x96/fQ4Rj88lZ0ORzaU6yK0e"], ["role", 100], ["created_at", "2016-04-16 04:24:40.492358"], ["updated_at", "2016-04-16 04:24:40.492358"], ["uuid", "230f5a70-038b-11e6-885f-6c4008a6fa2a"]]
323540
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323541
+  (0.0ms) SAVEPOINT active_record_1
323542
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "230f5a70-038b-11e6-885f-6c4008a6fa2a"], ["uuid", "230f9436-038b-11e6-885f-6c4008a6fa2a"], ["secret", "8b1f8498-5b48-4aa6-a8e5-034eba7e41e2"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzBmNWE3MC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzBmOTQzNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.bsNjvjNmLljU_uckRuoi1fFDcJaO-2r1RgaKpMNDmgg"], ["created_at", "2016-04-16 04:24:40.494617"], ["updated_at", "2016-04-16 04:24:40.494617"]]
323543
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323544
+  (0.0ms) SAVEPOINT active_record_1
323545
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '230f5a70-038b-11e6-885f-6c4008a6fa2a') LIMIT 1
323546
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzBmNWE3MC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzBmOTQzNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.bsNjvjNmLljU_uckRuoi1fFDcJaO-2r1RgaKpMNDmgg"], ["updated_at", "2016-04-16 04:24:40.496281"], ["uuid", "230f5a70-038b-11e6-885f-6c4008a6fa2a"]]
323547
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323548
+ [ActiveJob] RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "230f5a70-038b-11e6-885f-6c4008a6fa2a"]]
323549
+ [ActiveJob] [ActionMailer::DeliveryJob] [728d4c2a-870f-41a5-accc-676cd07822e7] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/230f5a70-038b-11e6-885f-6c4008a6fa2a
323550
+ [ActiveJob] [ActionMailer::DeliveryJob] [728d4c2a-870f-41a5-accc-676cd07822e7] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
323551
+ [ActiveJob] [ActionMailer::DeliveryJob] [728d4c2a-870f-41a5-accc-676cd07822e7] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.1ms)
323552
+ [ActiveJob] [ActionMailer::DeliveryJob] [728d4c2a-870f-41a5-accc-676cd07822e7]
323553
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.8ms
323554
+ [ActiveJob] [ActionMailer::DeliveryJob] [728d4c2a-870f-41a5-accc-676cd07822e7]
323555
+ Sent mail to foo@example.com (3.6ms)
323556
+ [ActiveJob] [ActionMailer::DeliveryJob] [728d4c2a-870f-41a5-accc-676cd07822e7] Date: Fri, 15 Apr 2016 23:24:40 -0500
323557
+ From: no-reply@rails-identity.com
323558
+ To: foo@example.com
323559
+ Message-ID: <5711be887af66_1364d3fd924c52460749ca@galt.local.mail>
323560
+ Subject: [rails-identity] Email Confirmation
323561
+ Mime-Version: 1.0
323562
+ Content-Type: multipart/alternative;
323563
+ boundary="--==_mimepart_5711be887a601_1364d3fd924c52460748f8";
323564
+ charset=UTF-8
323565
+ Content-Transfer-Encoding: 7bit
323566
+
323567
+
323568
+ ----==_mimepart_5711be887a601_1364d3fd924c52460748f8
323569
+ Content-Type: text/plain;
323570
+ charset=UTF-8
323571
+ Content-Transfer-Encoding: 7bit
323572
+
323573
+ Dear foo@example.com,
323574
+
323575
+ Please confirm your account with rails-identity by making a PATCH request
323576
+ on the current user with a provided verification token. For example,
323577
+
323578
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzBmNWE3MC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzBmOTQzNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.bsNjvjNmLljU_uckRuoi1fFDcJaO-2r1RgaKpMNDmgg verified=true
323579
+
323580
+ will confirm the account. Here is the verification token:
323581
+
323582
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzBmNWE3MC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzBmOTQzNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.bsNjvjNmLljU_uckRuoi1fFDcJaO-2r1RgaKpMNDmgg
323583
+
323584
+ Thank you for using rails-identity,
323585
+ rails-identity
323586
+
323587
+
323588
+ ----==_mimepart_5711be887a601_1364d3fd924c52460748f8
323589
+ Content-Type: text/html;
323590
+ charset=UTF-8
323591
+ Content-Transfer-Encoding: 7bit
323592
+
323593
+ <html>
323594
+ <body>
323595
+ <p>Dear foo@example.com,</p>
323596
+
323597
+ <p>Please confirm your account with rails-identity by making a PATCH request
323598
+ on the current user with a provided verification token. For example,
323599
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzBmNWE3MC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzBmOTQzNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.bsNjvjNmLljU_uckRuoi1fFDcJaO-2r1RgaKpMNDmgg
323600
+ verified=true</pre> will confirm the account. Here is the verification
323601
+ token:</p>
323602
+
323603
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzBmNWE3MC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzBmOTQzNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.bsNjvjNmLljU_uckRuoi1fFDcJaO-2r1RgaKpMNDmgg</pre>
323604
+
323605
+ <p>Thank you for using rails-identity</p>
323606
+ <p><b>rails-identity</b></p>
323607
+
323608
+ </body>
323609
+ </html>
323610
+
323611
+ ----==_mimepart_5711be887a601_1364d3fd924c52460748f8--
323612
+
323613
+ [ActiveJob] [ActionMailer::DeliveryJob] [728d4c2a-870f-41a5-accc-676cd07822e7] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.9ms
323614
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 728d4c2a-870f-41a5-accc-676cd07822e7) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/230f5a70-038b-11e6-885f-6c4008a6fa2a
323615
+ Completed 201 Created in 20ms (Views: 0.3ms | ActiveRecord: 0.9ms)
323616
+  (0.7ms) rollback transaction
323617
+  (0.1ms) begin transaction
323618
+ ------------------------------------------------------------------------------------------------------------
323619
+ RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_reset_token_without_username
323620
+ ------------------------------------------------------------------------------------------------------------
323621
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323622
+ Processing by RailsIdentity::UsersController#update as HTML
323623
+ Parameters: {"issue_verification_token"=>true, "id"=>"current"}
323624
+ Accepts a token
323625
+ Token decode error: Nil JSON web token
323626
+ Suppressing error: Invalid token:
323627
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" IS NULL LIMIT 1
323628
+ RailsIdentity::Errors::ObjectNotFoundError
323629
+ Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
323630
+  (0.0ms) rollback transaction
323631
+  (0.1ms) begin transaction
323632
+ ------------------------------------------------------
323633
+ RailsIdentity::UsersControllerTest: test_create_a_user
323634
+ ------------------------------------------------------
323635
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323636
+ Processing by RailsIdentity::UsersController#create as HTML
323637
+ Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
323638
+ Accepts a token
323639
+ Token decode error: Nil JSON web token
323640
+ Suppressing error: Invalid token:
323641
+ Create new user
323642
+  (0.1ms) SAVEPOINT active_record_1
323643
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
323644
+ SQL (0.2ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$uDjSyvMv1Jfs8A0UImwN/OpKxquVBpxjfYne9RdroBm2E2baKIwQO"], ["role", 10], ["created_at", "2016-04-16 04:24:40.520266"], ["updated_at", "2016-04-16 04:24:40.520266"], ["uuid", "23139cde-038b-11e6-885f-6c4008a6fa2a"]]
323645
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323646
+  (0.0ms) SAVEPOINT active_record_1
323647
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "23139cde-038b-11e6-885f-6c4008a6fa2a"], ["uuid", "2313e414-038b-11e6-885f-6c4008a6fa2a"], ["secret", "928508ba-9a32-455c-88b5-72e81cfd0baf"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzEzOWNkZS0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzEzZTQxNC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.b3_T87EhQkiUqg03bvM2eSzYMMmBPcwocShc1Lbky0o"], ["created_at", "2016-04-16 04:24:40.523023"], ["updated_at", "2016-04-16 04:24:40.523023"]]
323648
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323649
+  (0.0ms) SAVEPOINT active_record_1
323650
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '23139cde-038b-11e6-885f-6c4008a6fa2a') LIMIT 1
323651
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzEzOWNkZS0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzEzZTQxNC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.b3_T87EhQkiUqg03bvM2eSzYMMmBPcwocShc1Lbky0o"], ["updated_at", "2016-04-16 04:24:40.524829"], ["uuid", "23139cde-038b-11e6-885f-6c4008a6fa2a"]]
323652
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323653
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "23139cde-038b-11e6-885f-6c4008a6fa2a"]]
323654
+ [ActiveJob] [ActionMailer::DeliveryJob] [f2442736-9fff-4271-b5fc-b22e2bbf4c98] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/23139cde-038b-11e6-885f-6c4008a6fa2a
323655
+ [ActiveJob] [ActionMailer::DeliveryJob] [f2442736-9fff-4271-b5fc-b22e2bbf4c98] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
323656
+ [ActiveJob] [ActionMailer::DeliveryJob] [f2442736-9fff-4271-b5fc-b22e2bbf4c98] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
323657
+ [ActiveJob] [ActionMailer::DeliveryJob] [f2442736-9fff-4271-b5fc-b22e2bbf4c98]
323658
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.5ms
323659
+ [ActiveJob] [ActionMailer::DeliveryJob] [f2442736-9fff-4271-b5fc-b22e2bbf4c98]
323660
+ Sent mail to foo@example.com (4.5ms)
323661
+ [ActiveJob] [ActionMailer::DeliveryJob] [f2442736-9fff-4271-b5fc-b22e2bbf4c98] Date: Fri, 15 Apr 2016 23:24:40 -0500
323662
+ From: no-reply@rails-identity.com
323663
+ To: foo@example.com
323664
+ Message-ID: <5711be8882158_1364d3fd924c524607518b@galt.local.mail>
323665
+ Subject: [rails-identity] Email Confirmation
323666
+ Mime-Version: 1.0
323667
+ Content-Type: multipart/alternative;
323668
+ boundary="--==_mimepart_5711be888163b_1364d3fd924c5246075042";
323669
+ charset=UTF-8
323670
+ Content-Transfer-Encoding: 7bit
323671
+
323672
+
323673
+ ----==_mimepart_5711be888163b_1364d3fd924c5246075042
323674
+ Content-Type: text/plain;
323675
+ charset=UTF-8
323676
+ Content-Transfer-Encoding: 7bit
323677
+
323678
+ Dear foo@example.com,
323679
+
323680
+ Please confirm your account with rails-identity by making a PATCH request
323681
+ on the current user with a provided verification token. For example,
323682
+
323683
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzEzOWNkZS0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzEzZTQxNC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.b3_T87EhQkiUqg03bvM2eSzYMMmBPcwocShc1Lbky0o verified=true
323684
+
323685
+ will confirm the account. Here is the verification token:
323686
+
323687
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzEzOWNkZS0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzEzZTQxNC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.b3_T87EhQkiUqg03bvM2eSzYMMmBPcwocShc1Lbky0o
323688
+
323689
+ Thank you for using rails-identity,
323690
+ rails-identity
323691
+
323692
+
323693
+ ----==_mimepart_5711be888163b_1364d3fd924c5246075042
323694
+ Content-Type: text/html;
323695
+ charset=UTF-8
323696
+ Content-Transfer-Encoding: 7bit
323697
+
323698
+ <html>
323699
+ <body>
323700
+ <p>Dear foo@example.com,</p>
323701
+
323702
+ <p>Please confirm your account with rails-identity by making a PATCH request
323703
+ on the current user with a provided verification token. For example,
323704
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzEzOWNkZS0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzEzZTQxNC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.b3_T87EhQkiUqg03bvM2eSzYMMmBPcwocShc1Lbky0o
323705
+ verified=true</pre> will confirm the account. Here is the verification
323706
+ token:</p>
323707
+
323708
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzEzOWNkZS0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzEzZTQxNC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.b3_T87EhQkiUqg03bvM2eSzYMMmBPcwocShc1Lbky0o</pre>
323709
+
323710
+ <p>Thank you for using rails-identity</p>
323711
+ <p><b>rails-identity</b></p>
323712
+
323713
+ </body>
323714
+ </html>
323715
+
323716
+ ----==_mimepart_5711be888163b_1364d3fd924c5246075042--
323717
+
323718
+ [ActiveJob] [ActionMailer::DeliveryJob] [f2442736-9fff-4271-b5fc-b22e2bbf4c98] Performed ActionMailer::DeliveryJob from Inline(mailers) in 7.6ms
323719
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: f2442736-9fff-4271-b5fc-b22e2bbf4c98) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/23139cde-038b-11e6-885f-6c4008a6fa2a
323720
+ Completed 201 Created in 20ms (Views: 0.4ms | ActiveRecord: 1.0ms)
323721
+  (0.6ms) rollback transaction
323722
+  (0.1ms) begin transaction
323723
+ -------------------------------------------------------------------
323724
+ RailsIdentity::UsersControllerTest: test_cannot_update_another_user
323725
+ -------------------------------------------------------------------
323726
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323727
+ Processing by RailsIdentity::UsersController#update as HTML
323728
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"2"}
323729
+ Accepts a token
323730
+ Token well formatted for user 1,
323731
+ session 1
323732
+ Cache miss. Try database.
323733
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323734
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323735
+ Token well formatted and verified. Set cache.
323736
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323737
+ Attempting to get RailsIdentity::User 2
323738
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
323739
+ Checking to see if authorized to access object
323740
+ RailsIdentity::Errors::UnauthorizedError
323741
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
323742
+  (0.1ms) rollback transaction
323743
+  (0.0ms) begin transaction
323744
+ -------------------------------------------------------------------------------------------------
323745
+ RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_without_username
323746
+ -------------------------------------------------------------------------------------------------
323747
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323748
+ Processing by RailsIdentity::UsersController#update as HTML
323749
+ Parameters: {"issue_reset_token"=>true, "id"=>"current"}
323750
+ Accepts a token
323751
+ Token decode error: Nil JSON web token
323752
+ Suppressing error: Invalid token:
323753
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" IS NULL LIMIT 1
323754
+ RailsIdentity::Errors::ObjectNotFoundError
323755
+ Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
323756
+  (0.1ms) rollback transaction
323757
+  (0.0ms) begin transaction
323758
+ --------------------------------------------------------------------
323759
+ RailsIdentity::UsersControllerTest: test_cannot_update_invalid_email
323760
+ --------------------------------------------------------------------
323761
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323762
+ Processing by RailsIdentity::UsersController#update as HTML
323763
+ Parameters: {"username"=>"foobar", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
323764
+ Accepts a token
323765
+ Token well formatted for user 1,
323766
+ session 1
323767
+ Cache miss. Try database.
323768
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323769
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323770
+ Token well formatted and verified. Set cache.
323771
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323772
+ Attempting to get RailsIdentity::User 1
323773
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323774
+ Checking to see if authorized to access object
323775
+ Unpermitted parameters: token, id
323776
+  (0.1ms) SAVEPOINT active_record_1
323777
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foobar' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
323778
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
323779
+ Completed 400 Bad Request in 6ms (Views: 0.2ms | ActiveRecord: 0.3ms)
323780
+  (0.0ms) rollback transaction
323781
+  (0.0ms) begin transaction
323782
+ --------------------------------------------------------------------------
323783
+ RailsIdentity::SessionTest: test_session_has_token_and_secret_when_created
323784
+ --------------------------------------------------------------------------
323785
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323786
+  (0.1ms) rollback transaction
323787
+  (0.1ms) begin transaction
323788
+ -----------------------------------------------
323789
+ RailsIdentity::SessionTest: test_save_a_session
323790
+ -----------------------------------------------
323791
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
323792
+  (0.0ms) SAVEPOINT active_record_1
323793
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "231a7b12-038b-11e6-885f-6c4008a6fa2a"], ["secret", "552c2e56-5de2-4f18-aa51-e051e692c084"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjMxYTdiMTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYxOTkwMjgwfQ.oX6MKVSjQIYWDGNKjGKv6wiAFkOjjWAKGFMC6wgYh8M"], ["created_at", "2016-04-16 04:24:40.566052"], ["updated_at", "2016-04-16 04:24:40.566052"]]
323794
+  (0.1ms) RELEASE SAVEPOINT active_record_1
323795
+  (1.4ms) rollback transaction
323796
+  (0.1ms) begin transaction
323797
+ ---------------------------------------------------------------------
323798
+ RailsIdentity::SessionTest: test_cannot_save_a_session_without_a_user
323799
+ ---------------------------------------------------------------------
323800
+  (0.0ms) rollback transaction
323801
+  (0.0ms) begin transaction
323802
+ -----------------------------
323803
+ RailsIdentityTest: test_truth
323804
+ -----------------------------
323805
+  (0.0ms) rollback transaction