Unvalidated redirect spec added

This commit is contained in:
chrismo
2013-10-01 16:20:15 -05:00
parent 4f1526e021
commit 0021ddd036
@@ -0,0 +1,19 @@
require 'spec_helper'
feature 'unvalidated redirect' do
before do
UserFixture.reset_all_users
@normal_user = UserFixture.normal_user
end
scenario 'login redirects to anywhere', :js => true do
visit '/?url=http://example.com/do/evil/things'
within('.signup') do
fill_in 'email', :with => @normal_user.email
fill_in 'password', :with => @normal_user.clear_password
end
click_on 'Login'
current_url.should == 'http://example.com/do/evil/things'
end
end