File tree 1 file changed +5
-4
lines changed 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -43,21 +43,22 @@ def passwordless_sign_in(resource)
43
43
end
44
44
45
45
module SystemTestCase
46
- def passwordless_sign_out ( cls = nil )
46
+ def passwordless_sign_out ( cls = nil , only_path : false )
47
47
cls ||= "User" . constantize
48
48
resource = cls . model_name . to_s . tableize
49
49
50
- visit ( Passwordless . context . url_for ( resource , action : "destroy" ) )
50
+ visit ( Passwordless . context . url_for ( resource , action : "destroy" , only_path : only_path ) )
51
51
end
52
52
53
- def passwordless_sign_in ( resource )
53
+ def passwordless_sign_in ( resource , only_path : false )
54
54
session = Passwordless ::Session . create! ( authenticatable : resource )
55
55
56
56
magic_link = Passwordless . context . url_for (
57
57
session ,
58
58
action : "confirm" ,
59
59
id : session . to_param ,
60
- token : session . token
60
+ token : session . token ,
61
+ only_path : only_path
61
62
)
62
63
63
64
visit ( magic_link )
You can’t perform that action at this time.
0 commit comments