wordjelly-auth 1.4.0 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/auth/admin_create_users_controller.rb +7 -9
  3. data/app/controllers/auth/application_controller.rb +1 -3
  4. data/app/controllers/auth/concerns/devise_concern.rb +5 -4
  5. data/app/controllers/auth/concerns/otp_concern.rb +7 -4
  6. data/app/controllers/auth/concerns/token_concern.rb +22 -10
  7. data/app/controllers/auth/profiles_controller.rb +1 -1
  8. data/app/controllers/auth/registrations_controller.rb +1 -7
  9. data/app/controllers/auth/sessions_controller.rb +0 -3
  10. data/app/models/auth/concerns/chief_model_concern.rb +1 -1
  11. data/app/models/auth/concerns/notification_concern.rb +0 -2
  12. data/app/models/auth/concerns/user_concern.rb +7 -6
  13. data/app/views/layouts/auth/navbar/_personalization.html.erb +0 -2
  14. data/config/initializers/devise.rb +16 -16
  15. data/config/initializers/omniauth.rb +11 -5
  16. data/lib/auth/notify.rb +1 -2
  17. data/lib/auth/two_factor_otp.rb +4 -0
  18. data/lib/auth/version.rb +1 -1
  19. data/lib/wordjelly-auth.rb +1 -1
  20. data/spec/dummy/app/assets/time_hashes.json +1 -1
  21. data/spec/dummy/app/controllers/topics_controller.rb +1 -1
  22. data/spec/dummy/app/models/noti.rb +1 -1
  23. data/spec/dummy/app/models/user.rb +2 -2
  24. data/spec/dummy/log/development.log +17 -0
  25. data/spec/dummy/log/test.log +97083 -0
  26. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-0/-0dhrbY0GyOP-OwMgYIoIwx08gxlWeB6nRLgtQ-vhUs.cache +1 -0
  27. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-G/-G1nXy4LnP-1padJXRMq0gYex3KxVr9FeHvyjFhOxns.cache +1 -0
  28. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-c/-coZ9HrDBKWXMOPzHQVobptnxra-S-bwIwCqc_4IiEU.cache +0 -0
  29. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0S/0S3TQXmQdcOoHVbm1lf3TXSdtYp_W9PSeWflwASp-_U.cache +0 -0
  30. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/12/12_GSJot0s_T9zQsZt4TwgVW7YyTAV1rOrKkMosmAqY.cache +1 -0
  31. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/1U/1UcxcfcuuCi9V2eLzHmN0pyZTSdxjJePikHzuaBGsWE.cache +1 -0
  32. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/1Z/1Z79eTYT4t733p8ELTIx1wetBTnyxNNk3wIMFXloO1M.cache +0 -0
  33. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/1l/1lAmfBOdE8qRt9QMyGJDrt-FXCNUu9t9m2BtsGi8H-I.cache +0 -0
  34. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2T/2TCws4S9Q-TMgaH2pMlm-gKyxIr0-DrRA7JDOI_5wS8.cache +0 -0
  35. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/31/31B_xMNizeQWxBfgWMxFwI19bbfTytpJFiXeoSOPuj8.cache +0 -0
  36. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3K/3KNpL9z0AyalQsOSPsnGkQEC2_lv54OQ8k2z92XHDk4.cache +0 -0
  37. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3q/3qusNC-PNAGtm0tVoy-OLbW0l6NDBnbr8h6HsC6-ZwE.cache +0 -0
  38. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/40/40rH5cWLu9P-Ka9eaXaYLsiIMwo0lQU1uKJl87mmqp4.cache +0 -0
  39. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4k/4kGl3mzGAVt3OQrHipVrCTvobMGiNw1C3TAlM8d0jSo.cache +0 -0
  40. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5_/5_rNjsUQIG1kvx0Ea14xFiVUNZw-fQiCKFADtCUISl8.cache +0 -0
  41. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6P/6P2BRzaGXxd5wvxr6sWwgI1bZICtHCFMI6zQ_oZiOqk.cache +0 -0
  42. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7Y/7Y5LlLib_2JVdHyBWTD2jJE15HH6mBMmn-fO-4JFNVs.cache +0 -0
  43. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7u/7uFX_6SUih4Vpv_8-ugk1H7JpDXz1IvTpXI17HuSTbI.cache +1 -0
  44. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8J/8Jhgr_yvG58NUJCygqXHwkCHERvoyHhPOg10bYQy5nQ.cache +1 -0
  45. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8f/8foX5tYCyoYFpUsCT34-Bf6TpNNT6Kwd-XTv6aPxOhI.cache +1 -0
  46. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8t/8toCJcqwv4i9gl6liTXuXpsxiNatE-evUDcbHr0tz94.cache +1 -0
  47. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/BD/BDfByD14hJgYaN0eTEfiFeGlD7GbA_ABSzDr6dSOgMk.cache +0 -0
  48. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Bm/BmxJ5hMgr895pNBjWTXQDZBmV9BrSKILRBSs__eihb4.cache +0 -0
  49. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Cc/CcHTIg-2JC1vRhuCXNydi-RfjziOF5qO8kYLj-HzoUA.cache +0 -0
  50. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Cn/CnoShxpzz96vNVTeBqxA2k8ZBfnNHzHn2xIA7bD2jY4.cache +0 -0
  51. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/DJ/DJKxp6-JgYXtFs0yhhjItwnj36wnlH0uS6GOnpL4BN0.cache +0 -0
  52. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/D_/D_u3Rxnx5qB5j2rhRR0v7Fypt8j58ogFbmjh9QaL5Uc.cache +1 -0
  53. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Do/Dot0LXvqeMyL06wXeUn8DLrURrTztIy1318Qraz4tNo.cache +0 -0
  54. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Dz/Dz46sWpT9Is5wx29ihmFC0gW0wHKHFegvszl-ATyr04.cache +0 -0
  55. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/E5/E5SBLFshplGNpTsaq2qbuLDLGUW5NX0W6G08orTEfb8.cache +0 -0
  56. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/EB/EB3VH7Aqwf_pxOVmUvf4deSn_EF_00Pbs0aU-KVKrLU.cache +0 -0
  57. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/EW/EW0mRGtnT3pbtHOhXnmfGFACMcet5Ga3wX7LvUZSub4.cache +0 -0
  58. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ev/Evd9M2zuKBBZJtuyjN_JKq5YMjyO87lr9NXlImL4t0E.cache +0 -0
  59. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/F3/F3cZpkXnVS38KNxVg6GYRDXmAhGGY-40g1S6QS5xKnk.cache +1 -0
  60. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/FY/FYMgeP_Bepfhv0u1xl0hcX3MyToXAa-jRzAFaX2eQ1w.cache +0 -0
  61. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Fw/FwhDpPgbwLhSrMMUdzy_-ttvTTgXxEeDPefOGFfVVjg.cache +1 -0
  62. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Fy/Fy9KYLBKO9dWxdcBNt4x1fu0Alk2d2bMSKfyVVxnEIU.cache +1 -0
  63. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/G8/G8iu2dUItlF_pydVrIJh_wgC5atY6t_4tH1xoLHLrDc.cache +1 -0
  64. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/J0/J0CfxOVkHAsR5OERX2QgPn-oNRq_1fAHhxavuGwpfJw.cache +0 -0
  65. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Jc/Jc4nbds2iZUXo6dLvnHTM0olhT_NCm6w2VDKk_Wicx0.cache +1 -0
  66. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Kq/KqrOZcHCPbn2wl5itOoIuGSL3lHJGjLnlNNiGqKSXik.cache +0 -0
  67. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/LQ/LQRU7cqg6V9X5aetvUuLDZZn9nenW6SI-QzOKP5sCL0.cache +0 -0
  68. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Lh/Lhl-3xF9pdODkFXSR0hrvXmI6ZAkvdbXxCPzAZnV5y4.cache +0 -0
  69. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Lx/Lxs71Xh2V4O2qeyWbuEPCmkJfsRdlk13ONaYrE1n9wA.cache +0 -0
  70. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/M-/M-xkCBgmq32eL5JZqjIxK6wtQXUq23nGa1XLpcuu1Qw.cache +1 -0
  71. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/MK/MKZHzwCTzUN-wws9EwIUjppigKorRPKR9ZbtE92ayU8.cache +1 -0
  72. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/MP/MPCPCXoDkqVYMarTQI6SHWsf6cnohji9-BQr4jK4HgE.cache +0 -0
  73. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/NI/NI8qTKlBTJSRWwzDbRgXHQdclFZkYdOCjnSubTsR8q0.cache +1 -0
  74. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/NZ/NZt2Fk8fjqCa38WUuIm3SVNE9pLABVJcLMwA73Aj75k.cache +0 -0
  75. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Nm/NmKt9xXes3qjjL7qBoOgOfm3MzxgoF-bcIOSScOEj_A.cache +0 -0
  76. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/OC/OCgU2H6mmLE7R1ly2ISlkKWR00THjG4oZpOICXgS6So.cache +0 -0
  77. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PB/PB-PxUvSlCbndtGCq5I-hPKgHO7TKMFukbldi6MnQA4.cache +1 -0
  78. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PB/PBHtjw1AR4rCnSGQ5LaH5J3n3z0lLq2y6UTj7Z0Pwtk.cache +0 -0
  79. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PT/PTgdtSaUOPELoOtDA34Sw4804A_el4Dm2j0rRA7cnFU.cache +1 -0
  80. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Pq/PqVW--mUwbLir-XGjudr-ErZ6D9yfMsiYB6izLt0N8c.cache +0 -0
  81. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Pt/PtM54QYZqornlZVQzg4zcRESJBwc1sqqkTaSNsmNcAs.cache +0 -0
  82. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Q3/Q3CyfZaRjU5DIQuBAAhQOELbbj2DLEoFW_yKj_1hobQ.cache +1 -0
  83. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qv/QvTX_ppHbQG831XEDjBaxwq8CAjBVaLFNvY5xANghb4.cache +0 -0
  84. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qy/QyNeUuf3eE6ueqjRzWvtO4N93QgQnuQNc7B8yk8HYs4.cache +0 -0
  85. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/RG/RGKD9rejvAJ0vOZYPxeU7ahImQUQ-Z4lmlm7sF3dLkg.cache +0 -0
  86. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Rs/Rs9BnF25JQdTl4JaucXLu0xkTuJ3ejZFt3A_D25zXqQ.cache +1 -0
  87. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/SV/SVkbUossZ05MhBUc3oKmndn5ZOKrfUXYmiFcADiGctI.cache +0 -0
  88. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Si/SiiD3tf3KNQA5hnNKIkL--jUSORyEVH7mUmjBN4z9ic.cache +0 -0
  89. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/T1/T1nKgCtKoK7k7opWfcmRpkyetldn-pb1ZhbRjluCy2I.cache +0 -0
  90. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ti/TieOlds8L-CqvMqVFup3GtbotBBsO0q-6_gNt9zTFGo.cache +0 -0
  91. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Un/UnGq_QfVsYWG6no7Jgp0uPY-gCpasdjwNRUrqbaMNAI.cache +1 -0
  92. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Uw/Uw-q52a_hUiyV6sSnGaYy2db4clS3pvnzG1TKRbpL8Y.cache +0 -0
  93. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Uy/UyWRUz3W6gylcdAVgiRRpaUZL4O5miHh4jmX7o-1xg4.cache +1 -0
  94. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/VI/VIonoCAtoPJEHyodwQkwp611LZtr3jHG4LzC-F1hF84.cache +0 -0
  95. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Vh/VhxsJpfat6UsgoVQCQg1Ym2FYDXUOH78NLF3d0FuJS4.cache +0 -0
  96. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Vn/VnIG8lgvhZr2Si37Q-bUrMpVb_zDw_7uMKITTO-ovU0.cache +1 -0
  97. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Vv/VvQbcrRv_qDg5JPUweKJ-vcVRJDgkkuOHioRSsKEEbc.cache +0 -0
  98. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/WJ/WJ-e2Z8tTnmWXlQXwUI8EZnB90yGiFMYtTfxpK2gOvU.cache +1 -0
  99. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Wn/WnkRWDYrvGLVMSb-D3I7dmRiIwFqpXNm38q9fJERlCk.cache +0 -0
  100. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/X3/X3smAVji-ukCfsZEDAxoOZLpw8mT4Mj-fAbNVG9-9bQ.cache +0 -0
  101. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/X9/X9b8M0d2usej58k1zoDmbBdjSdBhN0x1QtWhmnh-JG4.cache +0 -0
  102. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Y9/Y9aAK1BuseBw1dCFf7663-37yVBgaRYvksiZ2KJSfvk.cache +1 -0
  103. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/YJ/YJdLwUSTqw6BkhdtdMgfjMSdelN2-81K7efXUW6jRJU.cache +0 -0
  104. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/YS/YSq1BFD3X5FC7M_habJoT5avPD2YdPLqr0sR1wWWAvk.cache +0 -0
  105. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ye/Yeod13x4QZ_yg24AXWAplizzEeT4vmYpFaW-8ByTAyI.cache +4 -0
  106. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Zl/Zl-FTV4vKa2r3nBU7NRBdlkyRgcIo7NOyqsfaqdX_fg.cache +0 -0
  107. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Zz/ZzHkXwTsIIQP9RxHuaUK5e7dLIn-97MEMx4FIMfTeQ4.cache +0 -0
  108. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_p/_pMJDnS03nKNwhX6yRLzcNGVCbhacORKScShrSx7MxI.cache +0 -0
  109. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_p/_pS1zE8_3SWBv08G8D0PbOrKWwWlu1J-10DIcKTkgO0.cache +0 -0
  110. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/aU/aUdedQfJRE4WM1yhkBqntdEdsLi9Afvy4vJCZT_HC1o.cache +0 -0
  111. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/aW/aWvPO8gLdbq7hPlaVWsmAjqBaF8YSdYy037mMDXW4Tg.cache +1 -0
  112. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ai/aif0HXHTP8TTkJLP5WgJJWRX-3WuhyXitAQqKggdkcI.cache +0 -0
  113. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bZ/bZTOj3FkHGhajkYgEen2owanSvTPSosjpiW1XxECilw.cache +0 -0
  114. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/c6/c6AR_6VzNekyDzXLdRhwvHoXWWbn09mT5UNPBqF8UpA.cache +0 -0
  115. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/c_/c_h7t7u_rFR3KnBBfzFsDc4YAUt0EZTw96CPQ1kLFf8.cache +0 -0
  116. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/cm/cmQOyDMGQlBXxS-cEfW3ybQyDtYbA_ELFjyA2HMV7rs.cache +0 -0
  117. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/cs/csUv0EfXstJ9ICGSfTaFbGDO-dOXno_sHKVEKyM_Nhc.cache +0 -0
  118. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dH/dHiZ5z2yXwZwOieEvpwWUUaKghyAC0iCIjW2q2kVeUE.cache +0 -0
  119. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dJ/dJRQPj1XGX75PaQ17AgiKl5kyCK6bV7ylMbbMqbXuco.cache +0 -0
  120. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dZ/dZMQcf9OWIgXcTJCJ1GTVDVe19S9ZgiG_1e1a780d_Q.cache +0 -0
  121. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dq/dqNP-F6bmkWZMlXgf-329jtqOGCKF2oXUvNr5bhPbQE.cache +1 -0
  122. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dz/dzuY7AKX-enWr0rYgYH4OXHi-LBvc0isw5ie0yO45e4.cache +0 -0
  123. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/f8/f88N5DXkOKgPc-nGhMPxgpspka0NaeEVCBzGvwaE8BM.cache +0 -0
  124. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fa/faDulrH9S1Be0m8ztxG5g5ynbRBVxf70wOB6vrVMywE.cache +0 -0
  125. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gp/gpFDoJpjw_aE4DhvaqWOaFhXiqIvF0WSfjTnl8Q3G0U.cache +0 -0
  126. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/im/im4F5IlDskeBDAqDQULkPwTLhrSZJ_tYk1TmHmRujjg.cache +0 -0
  127. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iv/ivDNGgRa-TXRJNXFJu1KUl5gfJXv6A3HJck8dhCMDrs.cache +1 -0
  128. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ix/ixuoKIlw0Kp3KfosOL87jmUF47SvtIQB-3P-Klex8go.cache +0 -0
  129. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/jc/jcHgYxE_SR00sIQslkTchNwH3zBVkUuEI8ePXqylmHQ.cache +1 -0
  130. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/jl/jlRTXjvTvwfw694lhUYco9VNQ5p9wUZjcNZPw4DBkH4.cache +0 -0
  131. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/k3/k35ajM7sLMUFU8Q0Eicz8ll4aAuVA7vaOR2ZZRKYl6M.cache +0 -0
  132. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/l-/l-AjdVtB_eIbbSI8T3oY9RxX6MaokgElNwezpCrU0tc.cache +0 -0
  133. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nL/nLc7sVZTvR9ZySmCVbOm3L11K3OIFglLjTfR_wfqP1Y.cache +0 -0
  134. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nN/nNDg8M6LNx27UKt--_qjy5w3B3w2ZQXfVHofJ_9iOIc.cache +0 -0
  135. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/o8/o8zU5S5FxBlyHKTWbAxaZSS96PBkQFKJtsQpJGhPevk.cache +1 -0
  136. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/o9/o9gxmoLOIG_-nCNB7oRpVgRr6i--xBUWFKgKjtKV2sc.cache +1 -0
  137. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oR/oRrswfAuldTZ9brG64pYLewt9Zi99QOmMXZ0lyGv708.cache +5 -0
  138. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oj/ojEGth9PSl5TGslt-isut9GtJZpuhewIjzV05sVKEkI.cache +0 -0
  139. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pB/pBtiG2EBPXNZ0lpzVX6g6hZKKImEJfIsdNfhJWYX-iw.cache +0 -0
  140. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pO/pO79DiFftJguHoaUHA9OkE73QnTLdyxEs_UwCXXClcg.cache +0 -0
  141. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qI/qIFKqiroYFomfrmRXac4nF_0AsVorETB_bIagFIbkcM.cache +0 -0
  142. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qu/qu6F54GREhiOp_2P6ppQ-8NeZsYlveIvYKQlgXcghts.cache +0 -0
  143. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/r6/r64nn_NhSInz6BbD3EDCK2I-gTTY4g-B0RHgrv_SJ_A.cache +0 -0
  144. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rA/rAcSMdSYlR0BYo0DfMZrKdbZa-LIFyzsOyUM6tQZ0QA.cache +0 -0
  145. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rf/rfrwzmCwUJdLJ-4vW6Ho4n9OHtskPdrp1Sgxp8nfXO0.cache +0 -0
  146. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sz/szhmMT4rk7_w_vcKplrRBR85_r8aYTZ1E7QjasY2wj0.cache +0 -0
  147. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/t8/t8pUdgZt9yH9zIp1WN65Ir9roY_7kopnPOKJnvc2K3U.cache +1 -0
  148. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/tE/tEAobslXA32fbcT6i-lf-ZgKlWdPkLAUVJHOEq9AhBI.cache +0 -0
  149. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/u9/u9ZAscd165iXfdEDwmQPbzClIh27yl1HRrn-q6t0EI0.cache +0 -0
  150. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uk/uk213HHY3gnm65Jj-SGfFcXcE_Q7YODVkxGDTefhmVw.cache +0 -0
  151. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/um/um5UeEadQEOsdN0EQQ4yZykW5lqFUPQ5_FUjcRFnQGs.cache +0 -0
  152. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/v5/v5g7KRwDAbcVPwY2UBAXijZMNgKyeP-OfIsGKP_7cmc.cache +0 -0
  153. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vF/vFVA03FCooxk6TthEgHU4yFupx8t23TwrrmX7J5tCUE.cache +0 -0
  154. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vP/vPke4WY2P8qj5V60qX_NWSeiVn8v2Q6HTwko-0aoa8s.cache +0 -0
  155. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vv/vv77r1oYAYIEYc9esC2Pm0Yko7f4iiDqQD62ys6nCX4.cache +0 -0
  156. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vz/vzZSiCj2ChRKhiv1haund-oihmd8SXK0ENbEzBEMsF4.cache +0 -0
  157. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yC/yCS_vzjBPPIXrHoNaiFsaH4r4OR6nI9I0i0XnY-ZjvA.cache +0 -0
  158. data/spec/rails_helper.rb +9 -0
  159. data/spec/requests/user/additional_login_param_and_email_validation_spec.rb +19 -19
  160. data/spec/requests/user/admin_create_user_request_spec.rb +51 -25
  161. data/spec/requests/user/client_request_spec.rb +2 -2
  162. data/spec/requests/user/confirmation_request_spec.rb +12 -12
  163. data/spec/requests/user/omniauth_callbacks_request_spec.rb +30 -32
  164. data/spec/requests/user/otp_basic_flow_request_spec.rb +28 -28
  165. data/spec/requests/user/password_request_spec.rb +19 -19
  166. data/spec/requests/user/registration_request_spec.rb +54 -48
  167. data/spec/requests/user/session_request_spec.rb +28 -30
  168. data/spec/requests/user/token_request_spec.rb +58 -85
  169. data/spec/requests/user/unlock_request_spec.rb +8 -8
  170. data/spec/spec_helper.rb +3 -0
  171. metadata +205 -57
@@ -26,7 +26,6 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
26
26
  @admin.save
27
27
  @admin_headers = { "CONTENT_TYPE" => "application/json" , "ACCEPT" => "application/json", "X-User-Token" => @admin.authentication_token, "X-User-Es" => @admin.client_authentication["testappid"], "X-User-Aid" => "testappid"}
28
28
 
29
- ## add this line to stub the otp api calls, while running the tests.
30
29
  Auth.configuration.stub_otp_api_calls = true
31
30
 
32
31
  end
@@ -42,9 +41,12 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
42
41
  Noti.delete_all
43
42
  end
44
43
 
45
- it " -- creates user and sends otp -- " do
44
+ it " -- creates user and sends otp -- ", :crs => true do
46
45
 
47
- post admin_create_users_path,{user: {:additional_login_param => "9561137096"},:api_key => @ap_key, :current_app_id => "testappid"}.to_json, @admin_headers
46
+ puts "the admin headers are:"
47
+ puts @admin_headers.to_s
48
+
49
+ post admin_create_users_path, params: {user: {:additional_login_param => "9561137096"},:api_key => @ap_key, :current_app_id => "testappid"}.to_json, headers: @admin_headers
48
50
 
49
51
  user_created = assigns(:auth_user)
50
52
 
@@ -64,7 +66,7 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
64
66
  user_created = create_user_with_mobile
65
67
  initially_sent_otp = get_otp_session_id(user_created)
66
68
 
67
- get send_sms_otp_url({:resource => "users",:user => {:additional_login_param => user_created.additional_login_param},:api_key => @ap_key, :current_app_id => "testappid"}),nil,{ "CONTENT_TYPE" => "application/json" , "ACCEPT" => "application/json"}
69
+ get send_sms_otp_url({:resource => "users",:user => {:additional_login_param => user_created.additional_login_param},:api_key => @ap_key, :current_app_id => "testappid"}),params: nil,headers: { "CONTENT_TYPE" => "application/json" , "ACCEPT" => "application/json"}
68
70
 
69
71
  new_otp = get_otp_session_id(user_created)
70
72
 
@@ -82,7 +84,7 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
82
84
  ## we expect typhoeus to make a call to the
83
85
 
84
86
  # now call verify otp.
85
- get verify_otp_url({:resource => "users",:user => {:additional_login_param => user_created.additional_login_param, :otp => initially_sent_otp},:api_key => @ap_key, :current_app_id => "testappid"}),nil,{ "CONTENT_TYPE" => "application/json" , "ACCEPT" => "application/json"}
87
+ get verify_otp_url({:resource => "users",:user => {:additional_login_param => user_created.additional_login_param, :otp => initially_sent_otp},:api_key => @ap_key, :current_app_id => "testappid"}),params: nil,headers: { "CONTENT_TYPE" => "application/json" , "ACCEPT" => "application/json"}
86
88
 
87
89
  user_json_hash = JSON.parse(response.body)
88
90
  expect(user_json_hash.keys).to match_array(["nothing"])
@@ -102,7 +104,7 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
102
104
 
103
105
  req = {:id => user_created.id.to_s, :user => {:created_by_admin => true}, :resource => "users", api_key: @ap_key, :current_app_id => "testappid"}
104
106
 
105
- put profile_path({:id => user_created.id.to_s}),req.to_json,@admin_headers
107
+ put profile_path({:id => user_created.id.to_s}),params: req.to_json,headers: @admin_headers
106
108
 
107
109
  expect(response.code).to eq("204")
108
110
 
@@ -120,7 +122,7 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
120
122
 
121
123
  req = {:id => user_created.id.to_s, :user => {:created_by_admin => true}, :resource => "users", api_key: @ap_key, :current_app_id => "testappid"}
122
124
 
123
- put profile_path({:id => user_created.id.to_s}),req.to_json,@admin_headers
125
+ put profile_path({:id => user_created.id.to_s}),params: req.to_json,headers: @admin_headers
124
126
 
125
127
  expect(response.code).to eq("204")
126
128
 
@@ -172,7 +174,7 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
172
174
 
173
175
  it " -- creates a user with first name, last name, dob and mobile -- ", :admin_creates_user_with_personal_details => true do
174
176
 
175
- post admin_create_users_path,{user: {:email => "rrphotosoft@gmail.com", :first_name => "Bhargav", :last_name => "Raut", :date_of_birth => "10/10/1888", :sex => "Male", :title => "Dr"},:api_key => @ap_key, :current_app_id => "testappid"}.to_json, @admin_headers
177
+ post admin_create_users_path,params: {user: {:email => "rrphotosoft@gmail.com", :first_name => "Bhargav", :last_name => "Raut", :date_of_birth => "10/10/1888", :sex => "Male", :title => "Dr"},:api_key => @ap_key, :current_app_id => "testappid"}.to_json, headers: @admin_headers
176
178
 
177
179
  user_created = assigns(:auth_user)
178
180
  expect(user_created).not_to be_nil
@@ -193,7 +195,7 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
193
195
 
194
196
  it " -- creates the user and sends the confirmation email -- " do
195
197
 
196
- post admin_create_users_path,{user: {:email => "rrphotosoft@gmail.com"},:api_key => @ap_key, :current_app_id => "testappid"}.to_json, @admin_headers
198
+ post admin_create_users_path,params: {user: {:email => "rrphotosoft@gmail.com"},:api_key => @ap_key, :current_app_id => "testappid"}.to_json, headers: @admin_headers
197
199
 
198
200
  user_created = assigns(:auth_user)
199
201
  expect(user_created).not_to be_nil
@@ -214,7 +216,7 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
214
216
  initial_confirmation_token = get_confirmation_token_from_email
215
217
 
216
218
  initial_email_count = ActionMailer::Base.deliveries.size
217
- post user_confirmation_path,{user:{email: user_created.email}, api_key: @ap_key,:current_app_id => "testappid"}.to_json,{ "CONTENT_TYPE" => "application/json" , "ACCEPT" => "application/json"}
219
+ post user_confirmation_path,params: {user:{email: user_created.email}, api_key: @ap_key,:current_app_id => "testappid"}.to_json,headers: { "CONTENT_TYPE" => "application/json" , "ACCEPT" => "application/json"}
218
220
 
219
221
  new_confirmation_token = get_confirmation_token_from_email
220
222
 
@@ -231,7 +233,7 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
231
233
  ## first get the token, then send it to the confirmations path, and expect the reset password instructions to be sent, as a notification.
232
234
  user_created = create_user_with_email
233
235
  confirmation_token = get_confirmation_token_from_email
234
- get user_confirmation_path,{confirmation_token: confirmation_token, api_key: @ap_key, :current_app_id => "testappid"},{ "CONTENT_TYPE" => "application/json" , "ACCEPT" => "application/json"}
236
+ get user_confirmation_path,params: {confirmation_token: confirmation_token, api_key: @ap_key, :current_app_id => "testappid"},headers: { "CONTENT_TYPE" => "application/json" , "ACCEPT" => "application/json"}
235
237
 
236
238
  user_created = User.find(user_created.id.to_s)
237
239
  ## it will send the reset password email, check the emails.
@@ -253,7 +255,7 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
253
255
 
254
256
  req = {:id => user_created.id.to_s, :user => {:created_by_admin => true}, :resource => "users", api_key: @ap_key, :current_app_id => "testappid"}
255
257
 
256
- put profile_path({:id => user_created.id.to_s}),req.to_json,@admin_headers
258
+ put profile_path({:id => user_created.id.to_s}),params: req.to_json,headers: @admin_headers
257
259
 
258
260
  expect(response.code).to eq("204")
259
261
 
@@ -270,7 +272,7 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
270
272
  user_created = create_user_with_email
271
273
 
272
274
  # visit the confirmation link, with a frivolous confirmation token.
273
- get user_confirmation_path,{confirmation_token: "the sandman was looking for a legend for a girl", api_key: @ap_key, :current_app_id => "testappid"},{ "CONTENT_TYPE" => "application/json" , "ACCEPT" => "application/json"}
275
+ get user_confirmation_path,params: {confirmation_token: "the sandman was looking for a legend for a girl", api_key: @ap_key, :current_app_id => "testappid"},headers: { "CONTENT_TYPE" => "application/json" , "ACCEPT" => "application/json"}
274
276
 
275
277
  latter_reset_password_token = get_reset_password_token_from_email
276
278
 
@@ -310,7 +312,9 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
310
312
  context " -- validations --" do
311
313
  it " -- admin can simultaneously create user with email and mobile -- ", :simultaneous_email_password => true do
312
314
 
313
- post admin_create_users_path,{user: {:additional_login_param => "9561137096", :email => "bhargav.r.raut@gmail.com"},:api_key => @ap_key, :current_app_id => "testappid"}.to_json, @admin_headers
315
+ ActionMailer::Base.deliveries = []
316
+
317
+ post admin_create_users_path,params: {user: {:additional_login_param => "9561137096", :email => "bhargav.r.raut@gmail.com"},:api_key => @ap_key, :current_app_id => "testappid"}.to_json, headers: @admin_headers
314
318
 
315
319
  message = ActionMailer::Base.deliveries[-1] unless ActionMailer::Base.deliveries.blank?
316
320
 
@@ -325,15 +329,37 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
325
329
  context " -- user with email and mobile -- ", :simult => true do
326
330
 
327
331
  it " -- on verifying the email, a reset password link is sent by email, thereafter mobile can be verified, but reset password link is not sent again. -- ", :simult_email_sms_verify => true do
328
-
329
-
332
+
330
333
  pwd = SecureRandom.hex(24)
331
334
 
332
- attributes_for_user = {:email => Faker::Internet.email, :additional_login_param => "9561137096", :password => pwd, :password_confirmation => pwd, :created_by_admin => true}
333
- user = User.new(attributes_for_user)
335
+ if u = User.where(:additional_login_param => "9561137096")
336
+ if u.size > 0
337
+ u.first.delete
338
+ end
339
+ end
334
340
 
341
+ attributes_for_user = {:email => Faker::Internet.email, :additional_login_param => "9561137096", :password => pwd, :password_confirmation => pwd, :created_by_admin => true}
342
+
343
+ user = User.new(attributes_for_user)
335
344
  user.save
345
+ #puts user.errors.full_messages.to_s
346
+
347
+
348
+ #u = User.find(user.id.to_s)
349
+ #u.confirm
350
+
351
+ #u = User.find(user.id.to_s)
352
+ #u.created_by_admin = true
353
+ #u.save
354
+
355
+ #puts "user errors:"
356
+ #puts user.errors.full_messages.to_s
357
+ #exit(1)
336
358
 
359
+ # but on using admin_create
360
+ # there is no confirmation message.
361
+ # it directly sends a change password token right?
362
+
337
363
  ## a confirmation email should have been sent.
338
364
  message = ActionMailer::Base.deliveries[-1].to_s
339
365
  confirmation_token = nil
@@ -346,7 +372,7 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
346
372
 
347
373
  expect(confirmation_token).not_to be_nil
348
374
 
349
- get user_confirmation_path,{confirmation_token: confirmation_token}
375
+ get user_confirmation_path,params: {confirmation_token: confirmation_token}
350
376
 
351
377
  ## on confirming it should generate a reset_password_message.
352
378
  ## get the base deliveries.
@@ -440,7 +466,7 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
440
466
 
441
467
  ActionMailer::Base.deliveries = []
442
468
 
443
- get user_confirmation_path,{confirmation_token: confirmation_token}
469
+ get user_confirmation_path,params: {confirmation_token: confirmation_token}
444
470
 
445
471
  ## clear the base deliveries.
446
472
  ## on confirming it should generate a reset_password_message.
@@ -499,7 +525,7 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
499
525
  ## now do resend reset password link
500
526
  update_hash = {:resource => "users", :user => {:created_by_admin => true}, :api_key => @ap_key, :current_app_id => "testappid"}
501
527
 
502
- put profile_path(:id => user.id.to_s), update_hash.to_json, @admin_headers
528
+ put profile_path(:id => user.id.to_s), params: update_hash.to_json, headers: @admin_headers
503
529
 
504
530
  ## now it should have sent that message.
505
531
 
@@ -539,14 +565,14 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
539
565
  expect(confirmation_token).not_to be_nil
540
566
 
541
567
  user = User.find(user.id)
542
- user.confirm!
568
+ user.confirm
543
569
 
544
570
 
545
571
  ActionMailer::Base.deliveries = []
546
572
 
547
573
  update_hash = {:resource => "users", :user => {:created_by_admin => true}, :api_key => @ap_key, :current_app_id => "testappid"}
548
574
 
549
- put profile_path(:id => user.id.to_s), update_hash.to_json, @admin_headers
575
+ put profile_path(:id => user.id.to_s), params: update_hash.to_json, headers: @admin_headers
550
576
 
551
577
 
552
578
  message = ActionMailer::Base.deliveries[-1].to_s
@@ -609,7 +635,7 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
609
635
  expect(confirmation_token).not_to be_nil
610
636
 
611
637
  user = User.find(user.id)
612
- user.confirm!
638
+ user.confirm
613
639
 
614
640
 
615
641
  ## now we trigger reset.
@@ -618,7 +644,7 @@ RSpec.describe "admin create user spec", :admin_create_user => true, :type => :r
618
644
 
619
645
  update_hash = {:resource => "users", :user => {:created_by_admin => true}, :api_key => @ap_key, :current_app_id => "testappid"}
620
646
 
621
- put profile_path(:id => user.id.to_s), update_hash.to_json, @admin_headers
647
+ put profile_path(:id => user.id.to_s), params: update_hash.to_json, headers: @admin_headers
622
648
 
623
649
 
624
650
  message = ActionMailer::Base.deliveries[-1].to_s
@@ -16,7 +16,7 @@ RSpec.describe "client request spec", :client => true, :type => :request do
16
16
 
17
17
  context " -- json requests -- " do
18
18
  it " -- does not respond to json request -- " do
19
- get auth_client_path(:id => @u.id.to_s),nil,{ "CONTENT_TYPE" => "application/json" , "ACCEPT" => "application/json"}
19
+ get auth_client_path(:id => @u.id.to_s),params: nil,headers: { "CONTENT_TYPE" => "application/json" , "ACCEPT" => "application/json"}
20
20
  expect(response.code).to eq("401")
21
21
  end
22
22
  end
@@ -54,7 +54,7 @@ RSpec.describe "client request spec", :client => true, :type => :request do
54
54
  sign_in(@u)
55
55
  client = Auth::Client.find(@u.id.to_s)
56
56
 
57
- put auth_client_path(:id => @u.id.to_s), :client => {:add_app_id => "anything"}
57
+ put auth_client_path(:id => @u.id.to_s), params: {:client => {:add_app_id => "anything"}}
58
58
 
59
59
  expect(response.code).to eq("200")
60
60
  client = assigns(:client)
@@ -39,13 +39,13 @@ RSpec.describe "confirmation request spec",:confirmation => true,:authentication
39
39
 
40
40
  it "-- get request is successfull" do
41
41
 
42
- get new_user_confirmation_path,{}
42
+ get new_user_confirmation_path,params: {}
43
43
  expect(response.code).to eq("200")
44
44
  end
45
45
 
46
46
  it "-- create request is successfull" do
47
47
  prev_msg_count = ActionMailer::Base.deliveries.size
48
- post user_confirmation_path,{user:{email: @u.email}}
48
+ post user_confirmation_path,params: {user:{email: @u.email}}
49
49
  expect(response.code).to eq("302")
50
50
  message = ActionMailer::Base.deliveries[-1].to_s
51
51
  confirmation_token = nil
@@ -70,7 +70,7 @@ RSpec.describe "confirmation request spec",:confirmation => true,:authentication
70
70
  confirmation_token = j[:confirmation_token]
71
71
 
72
72
  end
73
- get user_confirmation_path,{confirmation_token: confirmation_token}
73
+ get user_confirmation_path,params: {confirmation_token: confirmation_token}
74
74
  @u.reload
75
75
  expect(@u.confirmed_at).not_to be(nil)
76
76
 
@@ -82,14 +82,14 @@ RSpec.describe "confirmation request spec",:confirmation => true,:authentication
82
82
 
83
83
 
84
84
  it "-- get request, client created, but no redirection" do
85
- get new_user_confirmation_path, {redirect_url: "http://www.google.com", api_key: @ap_key, current_app_id: @c.app_ids[0]}
85
+ get new_user_confirmation_path, params: {redirect_url: "http://www.google.com", api_key: @ap_key, current_app_id: @c.app_ids[0]}
86
86
  expect(response.code).to eq("200")
87
87
 
88
88
  end
89
89
 
90
90
  it "-- create request, client created, but no redirection" do
91
91
  prev_msg_count = ActionMailer::Base.deliveries.size
92
- post user_confirmation_path,{user:{email: @u.email},redirect_url: "http://www.google.com", api_key: @ap_key, current_app_id: @c.app_ids[0]}
92
+ post user_confirmation_path,params: {user:{email: @u.email},redirect_url: "http://www.google.com", api_key: @ap_key, current_app_id: @c.app_ids[0]}
93
93
 
94
94
  expect(session[:client]).not_to be_nil
95
95
  expect(session[:redirect_url]).not_to be_nil
@@ -123,17 +123,17 @@ RSpec.describe "confirmation request spec",:confirmation => true,:authentication
123
123
  context "-- no api key" do
124
124
 
125
125
  it "-- get request returns 406" do
126
- get new_user_confirmation_path,nil,@headers
126
+ get new_user_confirmation_path,params: nil,headers: @headers
127
127
  expect(response.code).to eq("406")
128
128
  end
129
129
 
130
130
  it "-- create request returns not authenticated" do
131
- post user_confirmation_path,{user:{email: @u.email}}.to_json,@headers
131
+ post user_confirmation_path,params: {user:{email: @u.email}}.to_json,headers: @headers
132
132
  expect(response.code).to eq("401")
133
133
  end
134
134
 
135
135
  it "-- show request returns not authenticated" do
136
- get user_confirmation_path,{confirmation_token: "dog"}.to_json,@headers
136
+ get user_confirmation_path,params: {confirmation_token: "dog"}.to_json,headers: @headers
137
137
  expect(response.code).to eq("401")
138
138
  end
139
139
 
@@ -144,7 +144,7 @@ RSpec.describe "confirmation request spec",:confirmation => true,:authentication
144
144
 
145
145
 
146
146
  it "-- get request returns 406" do
147
- get new_user_confirmation_path,{api_key: @ap_key,:current_app_id => "testappid"}.to_json,@headers
147
+ get new_user_confirmation_path,params: {api_key: @ap_key,:current_app_id => "testappid"}.to_json,headers: @headers
148
148
  expect(response.code).to eq("406")
149
149
  end
150
150
 
@@ -153,8 +153,8 @@ RSpec.describe "confirmation request spec",:confirmation => true,:authentication
153
153
  prev_msg_count = ActionMailer::Base.deliveries.size
154
154
 
155
155
 
156
- post user_confirmation_path,{user:{email: @u.email},
157
- api_key: @ap_key,:current_app_id => "testappid"}.to_json,@headers
156
+ post user_confirmation_path,params: {user:{email: @u.email},
157
+ api_key: @ap_key,:current_app_id => "testappid"}.to_json,headers: @headers
158
158
 
159
159
 
160
160
 
@@ -183,7 +183,7 @@ RSpec.describe "confirmation request spec",:confirmation => true,:authentication
183
183
  confirmation_token = j[:confirmation_token]
184
184
 
185
185
  end
186
- get user_confirmation_path,{confirmation_token: confirmation_token, api_key: @ap_key, :current_app_id => "testappid"}, @headers
186
+ get user_confirmation_path,params: {confirmation_token: confirmation_token, api_key: @ap_key, :current_app_id => "testappid"}, headers: @headers
187
187
  @u.reload
188
188
  expect(@u.confirmed_at).not_to be(nil)
189
189
  expect(response.code).to eq("201")
@@ -2,8 +2,6 @@ require "rails_helper"
2
2
 
3
3
  RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :omniauth => true do
4
4
 
5
-
6
-
7
5
  context " -- begin -- " do
8
6
  before(:each) do
9
7
 
@@ -30,7 +28,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
30
28
  context " -- google_oauth2 test -- ", google_oauth: true do
31
29
 
32
30
 
33
- it " -- handles invalid id_token -- " do
31
+ it " -- handles invalid id_token -- ", :goog_invalid => true do
34
32
 
35
33
  OmniAuth.config.test_mode = false
36
34
 
@@ -39,7 +37,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
39
37
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
40
38
  }
41
39
 
42
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
40
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
43
41
 
44
42
  expect(JSON.parse(response.body)).to eql({"failure_message" => "Invalid credentials"})
45
43
  end
@@ -54,7 +52,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
54
52
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
55
53
  }
56
54
 
57
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
55
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
58
56
 
59
57
  expect(JSON.parse(response.body)).to eql({"failure_message" => "Invalid credentials"})
60
58
 
@@ -72,7 +70,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
72
70
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
73
71
  }
74
72
 
75
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
73
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
76
74
 
77
75
  expect(response).to redirect_to(omniauth_failure_path("error"))
78
76
 
@@ -93,7 +91,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
93
91
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => nil}.to_json
94
92
  }
95
93
 
96
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
94
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
97
95
 
98
96
  expect(response).to redirect_to(omniauth_failure_path("no_resource"))
99
97
  end
@@ -112,7 +110,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
112
110
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
113
111
  }
114
112
 
115
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
113
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
116
114
  #puts response.body.to_s
117
115
  ##check that a user was created.
118
116
  ##check that identity was created.
@@ -138,7 +136,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
138
136
  :state => {:api_key => @c.api_key, :current_app_id => "assholde", :path => @c.path}.to_json
139
137
  }
140
138
 
141
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
139
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
142
140
 
143
141
  expect(response.code).to eql("401")
144
142
  expect(response.body).to eql("")
@@ -169,7 +167,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
169
167
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
170
168
  }
171
169
 
172
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
170
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
173
171
 
174
172
  #puts response.body.to_s
175
173
  json_response = JSON.parse(response.body)
@@ -207,7 +205,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
207
205
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
208
206
  }
209
207
 
210
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
208
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
211
209
 
212
210
  u = User.where(:email => "rrphotosoft@gmail.com").first
213
211
  expect(u).not_to be_nil
@@ -238,7 +236,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
238
236
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
239
237
  }
240
238
 
241
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
239
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
242
240
 
243
241
  #puts response.body.to_s
244
242
  json_response = JSON.parse(response.body)
@@ -263,7 +261,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
263
261
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
264
262
  }
265
263
 
266
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
264
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
267
265
 
268
266
  u = User.where(:email => "rrphotosoft@gmail.com").first
269
267
  expect(u).not_to be_nil
@@ -286,7 +284,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
286
284
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
287
285
  }
288
286
 
289
- post facebook_omniauth_callback_url,request_body.to_json,@headers
287
+ post facebook_omniauth_callback_url,params: request_body.to_json,headers: @headers
290
288
 
291
289
  expect(JSON.parse(response.body)).to eql({"failure_message" => "Invalid credentials"})
292
290
  end
@@ -302,7 +300,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
302
300
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
303
301
  }
304
302
 
305
- post facebook_omniauth_callback_url,request_body.to_json,@headers
303
+ post facebook_omniauth_callback_url,params: request_body.to_json,headers: @headers
306
304
 
307
305
  u = User.where(:email => "rrphotosoft@gmail.com").first
308
306
  expect(u).not_to be_nil
@@ -322,7 +320,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
322
320
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
323
321
  }
324
322
 
325
- post facebook_omniauth_callback_url,request_body.to_json,@headers
323
+ post facebook_omniauth_callback_url,params: request_body.to_json,headers: @headers
326
324
 
327
325
  expect(response).to redirect_to(omniauth_failure_path("error"))
328
326
 
@@ -340,7 +338,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
340
338
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => nil}.to_json
341
339
  }
342
340
 
343
- post facebook_omniauth_callback_url,request_body.to_json,@headers
341
+ post facebook_omniauth_callback_url,params: request_body.to_json,headers: @headers
344
342
 
345
343
  expect(response).to redirect_to(omniauth_failure_path("no_resource"))
346
344
  end
@@ -388,7 +386,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
388
386
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
389
387
  }
390
388
 
391
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
389
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
392
390
 
393
391
  end
394
392
 
@@ -406,7 +404,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
406
404
  }
407
405
 
408
406
 
409
- post facebook_omniauth_callback_url,request_body.to_json,@headers
407
+ post facebook_omniauth_callback_url,params: request_body.to_json,headers: @headers
410
408
 
411
409
  puts "total users with rrphotosoft------------------------------------------------------------------------------------------------------------------------"
412
410
  puts User.where(:email => "rrphotosoft@gmail.com").count
@@ -438,7 +436,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
438
436
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
439
437
  }
440
438
 
441
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
439
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
442
440
 
443
441
  u = User.where(:email => "rrphotosoft@gmail.com").first
444
442
 
@@ -460,7 +458,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
460
458
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
461
459
  }
462
460
 
463
- post facebook_omniauth_callback_url,request_body.to_json,@headers
461
+ post facebook_omniauth_callback_url,params: request_body.to_json,headers: @headers
464
462
 
465
463
  u = User.where(:email => "rrphotosoft@gmail.com").first
466
464
 
@@ -504,7 +502,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
504
502
  }
505
503
 
506
504
 
507
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
505
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
508
506
 
509
507
  user_created = User.where(:email => "rrphotosoft@gmail.com").first
510
508
  @confirmed_at_times << user_created.confirmed_at
@@ -522,7 +520,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
522
520
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
523
521
  }
524
522
 
525
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
523
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
526
524
  user_signed_in = User.where(:email => "rrphotosoft@gmail.com").first
527
525
 
528
526
  @confirmed_at_times << user_signed_in.confirmed_at
@@ -561,7 +559,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
561
559
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
562
560
  }
563
561
 
564
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
562
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
565
563
 
566
564
  user_created = User.where(:email => "rrphotosoft@gmail.com").first
567
565
  @confirmed_at_times << user_created.confirmed_at
@@ -581,7 +579,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
581
579
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
582
580
  }
583
581
 
584
- post facebook_omniauth_callback_url,request_body.to_json,@headers
582
+ post facebook_omniauth_callback_url,params: request_body.to_json,headers: @headers
585
583
 
586
584
  u = User.where(:email => "rrphotosoft@gmail.com").first
587
585
  @confirmed_at_times << u.confirmed_at
@@ -621,12 +619,12 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
621
619
 
622
620
  google_oauth2_verify_token_true_verify_hd_true
623
621
 
624
- post google_oauth2_omniauth_callback_url(:id_token => "rupert", :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json),nil,@headers
622
+ post google_oauth2_omniauth_callback_url(:id_token => "rupert", :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json),params: nil,headers: @headers
625
623
  end
626
624
 
627
625
  it " -- does not process forgot password instructions -- " do
628
626
  u = User.order_by(:confirmed_at => "desc").first
629
- post user_password_path,{user: {email: u.email}}
627
+ post user_password_path,params: {user: {email: u.email}}
630
628
  expect(ActionMailer::Base.deliveries).to be_empty
631
629
 
632
630
  end
@@ -671,7 +669,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
671
669
 
672
670
  google_oauth2_verify_token_true_verify_hd_true
673
671
 
674
- post google_oauth2_omniauth_callback_url(:id_token => "rupert", :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json),nil,@headers
672
+ post google_oauth2_omniauth_callback_url(:id_token => "rupert", :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json),params: nil,headers: @headers
675
673
 
676
674
 
677
675
  response_body = JSON.parse(response.body)
@@ -725,7 +723,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
725
723
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
726
724
  }
727
725
 
728
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
726
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
729
727
 
730
728
  end
731
729
 
@@ -740,7 +738,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
740
738
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
741
739
  }
742
740
 
743
- post facebook_omniauth_callback_url,request_body.to_json,@headers
741
+ post facebook_omniauth_callback_url,params: request_body.to_json,headers: @headers
744
742
 
745
743
  u = User.where(:email => "rrphotosoft@gmail.com").first
746
744
 
@@ -766,7 +764,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
766
764
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
767
765
  }
768
766
 
769
- post google_oauth2_omniauth_callback_url,request_body.to_json,@headers
767
+ post google_oauth2_omniauth_callback_url,params: request_body.to_json,headers: @headers
770
768
 
771
769
  u = User.where(:email => "rrphotosoft@gmail.com").first
772
770
 
@@ -788,7 +786,7 @@ RSpec.describe "Omniauth requests", :type => :request,:authentication => true, :
788
786
  :state => {:api_key => @c.api_key, :current_app_id => @c.app_ids[0], :path => @c.path}.to_json
789
787
  }
790
788
 
791
- post facebook_omniauth_callback_url,request_body.to_json,@headers
789
+ post facebook_omniauth_callback_url,params: request_body.to_json,headers: @headers
792
790
 
793
791
  u = User.where(:email => "rrphotosoft@gmail.com").first
794
792