GRN2-148: Always check that email notifications are enabled before sending an email (#539)

* Always check that email notificatiosn are enabled before sending an email

* Fix tests

* Fix formating

* Change to hardcoding the validation
This commit is contained in:
shawn-higgins1
2019-05-22 13:38:34 -04:00
committed by Jesus Federico
parent f88d67f6fb
commit eac8290001
2 changed files with 12 additions and 0 deletions

View File

@ -26,6 +26,10 @@ describe AdminsController, type: :controller do
end
describe "User Roles" do
before do
allow(Rails.configuration).to receive(:enable_email_verification).and_return(true)
end
context "GET #index" do
it "renders a 404 if a user tries to acccess it" do
@request.session[:user_id] = @user.id