Added a back_url field to the Rate for that will store the redirect path.
* Used in the User Administration panel so RatesController can redirect back to the panel as needed. #1914
This commit is contained in:
@@ -272,6 +272,13 @@ describe RatesController, "as an administrator" do
|
||||
response.should redirect_to(rates_url(:user_id => @user.id))
|
||||
end
|
||||
|
||||
it 'should redirect to the back_url if set' do
|
||||
back_url = '/back_to_this_url'
|
||||
Rate.stub!(:new).and_return(mock_rate(:save => true))
|
||||
post :create, :rate => {}, :back_url => back_url
|
||||
response.should redirect_to(back_url)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "with invalid params" do
|
||||
|
||||
Reference in New Issue
Block a user