add first integration test

This commit is contained in:
wvengen 2013-07-24 01:05:01 +02:00
parent 427a023135
commit d58ce31b7f
5 changed files with 72 additions and 3 deletions

View file

@ -0,0 +1,15 @@
module SessionHelper
def login(nick=nil, password=nil)
visit login_path
if nick.nil?
user = FactoryGirl.create :user
nick, password = user.nick, user.password
end
fill_in 'nick', :with => nick
fill_in 'password', :with => password
find('input[type=submit]').click
end
end