|
|
@ -6,12 +6,14 @@ RSpec.describe "User Features" do |
|
|
|
let(:reset_password_template_id) { DeviseNotifyMailer::RESET_PASSWORD_TEMPLATE_ID } |
|
|
|
let(:reset_password_template_id) { DeviseNotifyMailer::RESET_PASSWORD_TEMPLATE_ID } |
|
|
|
let(:notify_client) { instance_double(Notifications::Client) } |
|
|
|
let(:notify_client) { instance_double(Notifications::Client) } |
|
|
|
let(:reset_password_token) { "MCDH5y6Km-U7CFPgAMVS" } |
|
|
|
let(:reset_password_token) { "MCDH5y6Km-U7CFPgAMVS" } |
|
|
|
|
|
|
|
let(:devise_notify_mailer) { DeviseNotifyMailer.new } |
|
|
|
|
|
|
|
|
|
|
|
before do |
|
|
|
before do |
|
|
|
allow_any_instance_of(DeviseNotifyMailer).to receive(:notify_client).and_return(notify_client) |
|
|
|
allow(DeviseNotifyMailer).to receive(:new).and_return(devise_notify_mailer) |
|
|
|
allow_any_instance_of(DeviseNotifyMailer).to receive(:host).and_return("test.com") |
|
|
|
allow(devise_notify_mailer).to receive(:notify_client).and_return(notify_client) |
|
|
|
|
|
|
|
allow(devise_notify_mailer).to receive(:host).and_return("test.com") |
|
|
|
allow(notify_client).to receive(:send_email).and_return(true) |
|
|
|
allow(notify_client).to receive(:send_email).and_return(true) |
|
|
|
allow_any_instance_of(User).to receive(:set_reset_password_token).and_return(reset_password_token) |
|
|
|
allow(Devise.token_generator).to receive(:generate).and_return(reset_password_token) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
context "when the user navigates to case logs" do |
|
|
|
context "when the user navigates to case logs" do |
|
|
|