services controller should now go back to the referer. this might not actually work
This commit is contained in:
parent
3fd5852d44
commit
52908cec1a
2 changed files with 2 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ class ServicesController < ApplicationController
|
|||
end
|
||||
|
||||
flash[:notice] = I18n.t 'services.create.success'
|
||||
redirect_to services_url
|
||||
redirect_to :back
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ describe ServicesController do
|
|||
describe '#create' do
|
||||
it 'creates a new OmniauthService' do
|
||||
request.env['omniauth.auth'] = omniauth_auth
|
||||
request.env["HTTP_REFERER"] = ""
|
||||
lambda{post :create}.should change(user.services, :count).by(1)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue