test/integration/config_test.rb in quo_vadis-1.0.7 vs test/integration/config_test.rb in quo_vadis-1.1.0
- old
+ new
@@ -16,16 +16,16 @@
sign_in_as 'bob', 'secret'
assert_equal articles_path, current_path
end
test 'signed_in_url proc config' do
- QuoVadis.signed_in_url = Proc.new do |user|
+ QuoVadis.signed_in_url = Proc.new do |user, controller|
user.name == 'Bob' ? :articles : :root
end
sign_in_as 'bob', 'secret'
assert_equal articles_path, current_path
- QuoVadis.signed_in_url = Proc.new do |user|
+ QuoVadis.signed_in_url = Proc.new do |user, controller|
user.name != 'Bob' ? :articles : :root
end
sign_in_as 'bob', 'secret'
assert_equal root_path, current_path
end