master
1require "rails_helper"
2
3describe "Registration", js: true do
4 context "when an email is not registered" do
5 it "lets you register with that email address" do
6 visit login_path
7 within("#new_user") do
8 fill_in('user_name', with: 'John Smith')
9 fill_in('user_email', with: FFaker::Internet.email)
10 fill_in('user_password', with: 'password')
11 check('accepted')
12 click_button "submit-registration"
13 end
14 expect(page).to have_content("Dashboard")
15 end
16 end
17end