Fixed tests

pull/14844/head
antoniocarlon 5 years ago
parent 0906c517cb
commit 89ef786dbf

@ -75,4 +75,11 @@ class PasswordResetsController < ApplicationController
@organization = @user.organization
end
def build_url(view_name)
organization_name = @user.organization.try(:name)
base_url = CartoDB.base_url(organization_name)
path = CartoDB.path(self, "#{view_name}_password_reset")
"#{base_url}#{path}"
end
end

@ -33,9 +33,10 @@ describe PasswordResetsController do
post create_password_reset_path, payload, @headers
response.status.should == 200
response.body.should include "Cannot find email"
request.path.should eq create_password_reset_path
response.status.should == 302
follow_redirect!
request.path.should eq sent_password_reset_path
end
it 'updates the user password_reset_token and password_reset_sent_at' do

@ -29,7 +29,7 @@ feature "Forgot password" do
fill_in 'email', with: 'notfound@example.com'
click_button "Send"
page.should have_css "[data-content='Cannot find email.']"
page.should have_content("Ok, we have sent you an email")
end
scenario "Reset password redirects to the right view" do

Loading…
Cancel
Save