This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe 'PUT #update' do | |
let!(:user) { create(:user_complete_profile) } | |
let(:params) { { user: { id: user.id, email: 'changed@gmail.com' } } } | |
before do | |
sign_in user | |
session[:return_to] = projects_path | |
end | |
it 'we should be on projects path' do | |
put :update, params: params | |
user.reload | |
expect(user.email).to eq('changed@gmail.com') | |
expect(response).to redirect_to projects_path | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment