add first integration test
This commit is contained in:
parent
427a023135
commit
d58ce31b7f
5 changed files with 72 additions and 3 deletions
15
spec/support/session_helper.rb
Normal file
15
spec/support/session_helper.rb
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue