make integration spec work with javascript driver too
This commit is contained in:
parent
a858ceedea
commit
0d33922ed9
4 changed files with 33 additions and 2 deletions
|
|
@ -4,7 +4,11 @@ module SessionHelper
|
|||
def login(user=nil, password=nil)
|
||||
visit login_path
|
||||
user = FactoryGirl.create :user if user.nil?
|
||||
nick, password = user.nick, user.password if user.instance_of? ::User
|
||||
if user.instance_of? ::User
|
||||
nick, password = user.nick, user.password
|
||||
else
|
||||
nick = user
|
||||
end
|
||||
fill_in 'nick', :with => nick
|
||||
fill_in 'password', :with => password
|
||||
find('input[type=submit]').click
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue