Add login & user tests
This commit is contained in:
12
spec/support/helpers.rb
Normal file
12
spec/support/helpers.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
module Helpers
|
||||
def login(user)
|
||||
visit '/'
|
||||
fill_in "Email address", with: user.email_address
|
||||
fill_in "Password", with: user.password
|
||||
click_button "Sign in"
|
||||
end
|
||||
end
|
||||
|
||||
RSpec.configure do |c|
|
||||
c.include Helpers
|
||||
end
|
Reference in New Issue
Block a user